-
-
Notifications
You must be signed in to change notification settings - Fork 95
Ramda to Sanctuary
David Chambers edited this page Feb 26, 2018
·
21 revisions
Ramda | Sanctuary |
---|---|
R.add(a, b) |
S.add(a, b) |
R.addIndex(f) |
|
R.adjust(f, i, xs) |
|
R.all(f, xs) |
|
R.allPass(fs, x) |
S.allPass(fs, x) |
R.always(x) |
S.K(x) |
R.and(a, b) |
S.and(a, b) |
R.any(f, x) |
|
R.anyPass(f, xs) |
S.anyPass(f, xs) |
R.ap(a, b) |
S.ap(a, b) |
R.aperture() |
|
R.append(x, xs) |
S.append(x, xs) |
R.apply() |
|
R.applySpec() |
|
R.ascend() |
|
R.assoc(s, x, o) |
S.insert(s, x, o) |
R.assocPath() |
|
R.binary(f) |
S.curry2(f) |
R.bind() |
|
R.both(f, g) |
S.allPass([f, g]) |
R.call(f, x) |
S.A(f, x) |
R.chain(a, b) |
S.chain(a, b) |
R.clamp(a, b) |
|
R.clone() |
|
R.comparator() |
|
R.complement(f) |
S.complement(f) |
R.compose(f, g) |
S.compose(f, g) |
R.composeK(f, g) |
S.compose(S.chain(f), g) |
R.composeP() |
|
R.concat(xs, ys) |
S.concat(xs, ys) |
R.cond() |
|
R.construct() |
|
R.constructN() |
|
R.contains() |
|
R.converge() |
|
R.countBy() |
|
R.curry(f) |
S.curry<n>(f) |
R.curryN(f) |
S.curry<n>(f) |
R.dec(x) |
S.sub(1)(x) |
R.defaultTo(x, y) |
S.compose(S.fromMaybe(x), S.toMaybe, y) |
R.descend() |
|
R.difference() |
|
R.differenceWith() |
|
R.dissoc(s, o) |
S.remove(s, o) |
R.dissocPath() |
|
R.divide(x, y) |
S.div(x, y) |
R.drop(i, xs) |
S.fromMaybe([], S.drop(i, xs)) |
R.dropLast() |
S.fromMaybe([], S.dropLast(i, xs)) |
R.dropLastWhile() |
|
R.dropRepeats() |
|
R.dropRepeatsWith() |
|
R.dropWhile(f, xs) |
S.dropWhile(f, xs) |
R.either(f, g) |
S.anyPass([f, g]) |
R.empty(x) |
S.empty(x.constructor) |
R.eqBy(f, a, b) |
S.on(S.equals, f, a, b) |
R.eqProps(x, a, b) |
S.on(S.equals, S.prop(x), a, b) |
R.equals(a, b) |
S.equals(a, b) |
R.evolve(a, b) |
S.ap(b, a) |
R.F(x) |
S.K(false, x) |
R.filter(f, xs) |
S.filter(f, xs) |
R.find(f, xs) |
S.find(f, xs) |
R.findIndex() |
S.findIndex(f, xs) |
R.findLast() |
|
R.findLastIndex() |
|
R.flatten(xs) |
|
R.flip(f) |
S.flip(f) |
R.forEach() |
|
R.forEachObjIndexed() |
|
R.fromPairs(xs) |
S.fromPairs(xs) |
R.groupBy() |
|
R.groupWith() |
|
R.gt(x, y) |
S.gt_(x, y) |
R.gte(x, y) |
S.gte_(x, y) |
R.has() |
|
R.hasIn() |
|
R.head(xs) |
S.head(xs) returns Maybe |
R.identical() |
|
R.identity(x) |
S.I(x) |
R.ifElse() |
|
R.inc(x) |
S.add(1)(x) |
R.indexBy() |
|
R.indexOf() |
|
R.init(xs) |
S.init(xs) returns Maybe |
R.insert() |
|
R.insertAll() |
|
R.intersection() |
|
R.intersectionWith() |
|
R.intersperse() |
|
R.into() |
|
R.invert() |
|
R.invertObj() |
|
R.invoker() |
|
R.is(X, x) |
S.is(X, x) |
R.isArrayLike() |
|
R.isEmpty() |
|
R.isNil() |
|
R.join() |
|
R.juxt() |
|
R.keys(o) |
S.keys(o) |
R.keysIn() |
|
R.last(xs) |
S.last(xs) returns Maybe |
R.lastIndexOf() |
|
R.length(xs) |
S.size(xs) generalized over Foldable |
R.lens() |
|
R.lensIndex() |
|
R.lensPath() |
|
R.lensProp() |
|
R.lift() |
|
R.liftN() |
|
R.lt(x, y) |
S.lt(x, y) |
R.lte(x, y) |
S.lte(x, y) |
R.map(f, xs) |
S.map(f, xs) |
R.mapAccum() |
|
R.mapAccumRight() |
|
R.mapObjIndexed() |
|
R.match() |
|
R.mathMod() |
|
R.max(x, y) |
S.max(x, y) |
R.maxBy() |
|
R.mean() |
|
R.median() |
|
R.memoize() |
|
R.merge(o1, o2) |
S.concat(o1, o2) |
R.mergeAll() |
|
R.mergeWith() |
|
R.mergeWithKey() |
|
R.min(x, y) |
S.min(x, y) |
R.minBy() |
|
R.modulo() |
|
R.multiply(x, y) |
S.mult(x, y) |
R.nAry() |
|
R.negate(x) |
S.mult(-1)(x) |
R.none() |
|
R.not(b) |
S.not(b) |
R.nth(n, xs) |
S.at(n, xs) returns Maybe |
R.nthArg() |
|
R.objOf(s, x) |
S.singleton(s, x) |
R.of(x) |
S.of(typeRep, x) |
R.omit() |
|
R.once() |
|
R.or(x, y) |
S.or(x, y) |
R.over() |
|
R.pair() |
|
R.partial() |
|
R.partialRight() |
|
R.partition() |
|
R.path(p, o) |
S.props(p, o) |
R.pathEq() |
|
R.pathOr() |
|
R.pathSatisfies() |
|
R.pick() |
|
R.pickAll() |
|
R.pickBy() |
|
R.pipe(f1, f2, ...) |
S.pipe([f1, f2, ...]) |
R.pipeK() |
|
R.pipeP() |
|
R.pluck(p, xs) |
S.map(S.prop(p), xs) |
R.prepend(x, xs) |
S.prepend(x, xs) |
R.product(xs) |
S.product(xs) |
R.project() |
|
R.prop(s, o) |
S.prop(s, o) |
R.propEq() |
|
R.propIs() |
|
R.propOr(x, y z) |
S.compose(S.fromMaybe(x), S.get(S.K(true), y))(z) |
R.props |
|
R.propSatisfies() |
|
R.range(n, m) |
S.range(n, m) |
R.reduce(f, d, xs) |
S.reduce(f, d, xs) |
R.reduceBy() |
|
R.reduced() |
|
R.reduceRight() |
|
R.reduceWhile() |
|
R.reject() |
|
R.remove() |
|
R.repeat() |
|
R.replace() |
|
R.reverse(xs) |
S.reverse(xs) |
R.scan() |
|
R.sequence(f, xs) |
S.sequence(F, xs) takes a type representative |
R.set() |
|
R.slice(n, m, xs) |
S.slice(n, m, xs) returns Maybe |
R.sort(xs) |
S.sort(xs) |
R.sortBy(f, xs) |
S.sortBy(f, xs) |
R.sortWith() |
|
R.split(str, s) |
S.splitOn(str, s) |
R.split(regex, s) |
S.splitOnRegex(regex, s) |
R.splitAt() |
|
R.splitEvery() |
|
R.splitWhen() |
|
R.subtract(x, y) |
S.sub(x, y) |
R.sum(xs) |
S.sum(xs) |
R.symmetricDifference() |
|
R.symmetricDifferenceWith() |
|
R.T(x) |
S.K(true)(x) |
R.tail(xs) |
S.tail(xs) returns Maybe |
R.take(n, xs) |
S.take(n, xs) returns Maybe |
R.takeLast(n, xs) |
S.takeLast(n, xs) returns Maybe |
R.takeLastWhile() |
|
R.takeWhile(f, xs) |
S.takeWhile(f, xs) returns Maybe, doesn't work with String |
R.tap() |
|
R.test(r, s) |
S.test(r, s) |
R.times() |
|
R.toLower(s) |
S.toLower(s) |
R.toPairs(o) |
S.pairs(o) |
R.toPairsIn() |
|
R.toString(x) |
S.toString(x) |
R.toUpper(s) |
S.toUpper(s) |
R.transduce() |
|
R.transpose() |
|
R.traverse(f, g, xs) |
S.traverse(F, g, xs) |
R.trim(s) |
S.trim(s) |
R.tryCatch() |
|
R.type(s) |
S.type(x).name |
R.unapply() |
|
R.unary() |
|
R.uncurryN() |
|
R.unfold(f :: b -> [a], d) |
S.unfoldr(f :: b -> Maybe (Pair a b), d) |
R.union() |
|
R.unionWith() |
|
R.uniq() |
|
R.uniqBy() |
|
R.uniqWith() |
|
R.unless(f, g, x) |
S.unless(f, g, x) |
R.unnest() |
|
R.until() |
|
R.update() |
|
R.useWith() |
|
R.values(o) |
S.values(o) all values must be of the same type |
R.valuesIn() |
|
R.view() |
|
R.when(f, g, x) |
S.when(f, g, x) |
R.where() |
|
R.whereEq() |
|
R.without() |
|
R.xprod(xs, ys) |
S.lift2(x => y => [x, y], xs, ys) |
R.zip() |
|
R.zipObj() |
|
R.zipWith() |