adjust
Adjust the element using the function.
R.adjust.run(R.inc, 1, R.with(1, 2, 3))
// (1, 3, 3)Adjust the element using the function.
R.adjust.run(R.inc, 1, R.with(1, 2, 3))
// (1, 3, 3)Check if all elements match the predicate.
R.all.run(R.isNotNull, R.with(1, 2, 3))
// trueAppend an element to the elements.
R.append.run(1, R.with(1, 2, 3))
// (1, 2, 3, 1)Set the key value.
R.assoc.run('name', 'test', new Map())
// {name=test} Map over both the keys and values.
R.bimap.run(R.append.apply('_key'), R.append.apply('_value'), R.withObj('name', 'test'))
// {test_key=test_value}Concatenate two objects.
R.concat.run(R.with(1, 2, 3), R.with(4, 5, 6))
// (4, 5, 6, 1, 2, 3)Check if the element is contained.
R.contains.run(1, R.with(1, 2, 3))
// trueCheck if the element is contained by the comparator returning boolean.
R.containsBy.run(R.equals, 1, R.with(1, 2, 3))
// trueCheck if the key is contained.
R.containsKey.run('name', new Map{ 'name' => 'test' })
// true Get counts by the key.
R.countBy.run(R.identity, R.with(1, 2, 2))
// {1=1, 2=2}Make a difference of the two objects.
R.difference.run(R.with(1, 2, 3), R.with(2, 3, 4))
// (4)Remove the key value.
R.dissoc.run('name', new Map{ 'name' => 'test' })
// {} Insert element at the index.
R.doInsert.run(1, 'x', R.with(1, 2, 3))
// (1, x, 2, 3)Insert elements at the index.
R.doInsertAll.run(1, R.with('x', 'y'), R.with(1, 2, 3))
// (1, x, y, 2, 3)Join the elements by the separator.
R.doJoin.run('-', R.with(1, 2, 3))
// 1-2-3Map over the elements.
R.doMap.run(R.inc, R.with(1, 2, 3))
// (2, 3, 4)Update an element of the elements.
R.doUpdate.run(1, 3, R.with(1, 2, 3))
// (1, 3, 3)Drop first N elements.
R.drop.run(1, 'abc')
// bcDrop first N elements from right.
R.dropRight.run(1, 'abc')
// abDrop elements from right until not satisfied.
R.dropRightWhile.run(R.equals.apply('a'), 'abc')
// abcDrop elements until not satisfied.
R.dropWhile.run(R.equals.apply('a'), 'abc')
// bcCheck ending with.
R.endsWith('a', 'abc')
// falseSame as all.
Filter on the elements.
R.filter.run(R.isNotNull, R.with('a', null, 'b'))
// (a, b)Find the first element that matches the predicate.
R.find.run(R.equals.apply('a'), R.with('a', 'b'))
// aFind the index of the first element that matches the predicate.
R.findIndex.run(R.equals.apply('a'), R.with('a', 'b'))
// 0Find the first element from last that matches the predicate.
R.findLast.run(R.equals.apply('a'), R.with('a', 'b'))
// aFind the index of the first element from last that matches the predicate.
R.findLastIndex.run(R.equals.apply('a'), R.with('a', 'b'))
// 0Get the first element.
R.first.run(R.with(1, 2, 3))
// 1Flatten the elements recursively.
R.flatten.run(R.with(1, R.with(2, R.with(3))))
// (1, 2, 3)Do for-each on the elements.
R.forEach.run(R.debug, R.with(1, 2, 3));
// 1
// 2
// 3Convert a list of pairs to map.
R.fromPairs.run(R.with(new R.Pair('a', 1)))
// {a=1}Get groups by the key.
R.groupBy.run(R.identity, R.with(1, 2, 2))
// {1=(1), 2=(2, 2)}Same as first.
Get indexes by the key.
R.indexBy.run(R.identity, R.with(1, 2, 2))
// {1=1, 2=2}Get the index of the first element found.
R.indexOf.run(1, R.with(1, 2, 3))
// 0Get the elements except the last.
R.init.run(R.with(1, 2, 3))
// (1, 2)Make an intersection of the two objects.
R.intersection.run(R.with(1, 2, 3), R.with(2, 3, 4))
// (2, 3)Check if it is empty.
R.isEmpty.run(R.with(1, 2, 3))
// falseGet the last element.
R.last.run(R.with(1, 2, 3))
// 3Get the index of the first element found from the last.
R.lastIndexOf.run(1, R.with(1, 2, 3))
// 0Get the length.
R.length.run(R.with(1, 2, 3))
// 3Check if none of the elements match the predicate.
R.none.run(R.isNotNull, R.with(1, 2, 3))
// trueGet the nth element.
R.nth.run(1, R.with(1, 2, 3))
// 2Create a pair.
R.pair.run(1, 2)
// Pair:[fst=1, snd=2]Create a partitioned pair using the predicate.
R.partition.run(R.equals.apply('a'), R.with('a', 'b', 'c'))
// Pair:[fst=(a), snd=(b, c)]Pluck the fields out of elements.
R.pluck.run('Description', R.with(new Account(Description='desc')))
// (desc)Prepend an element to the elements.
R.prepend.run(1, R.with(1, 2, 3))
// (1, 1, 2, 3)Project elements into other elements according to the fields.
R.project.run(R.with('Description'), R.with(new Account(Description='desc')))
// ({Description=desc})Generate a range of decimals.
R.range.run(1, 3)
// (1, 2)Reduce over the elements.
R.reduce.run(R.add, 0, R.with(1, 2, 3))
// 6Reject on the elements.
R.reject.run(R.isNull, R.with('a', null, 'b'))
// (a, b)Remove elements.
R.remove.run(1, 2, R.with(1, 2, 3))
// (1)Repeat the target to generate elements.
R.repeat.run(5, 'a')
// (a, a, a, a, a)Reverse the elements.
R.reverse.run('abc')
// cbaGet a random element.
R.sample.run('abcdef')
// eGet a list of random elements.
R.sampleSize.run(2, 'abcdef')
// dfCreate a shuffled collection.
R.shuffle.run('abcdef')
// fdeabcGet the size. See length.
Get a slice of the elements.
R.slice.run(0, 1, R.with(1, 2, 3))
// (1)Check if some elements match the predicate.
R.some.run(R.isNotNull, R.with(1, 2, 3))
// falseSort by the comparator.
R.sortBy.run(R.compare, R.with(3, 2, 1))
// (1, 2, 3)Sort by default.
R.sortDefault.run(R.with(3, 2, 1))
// (1, 2, 3)Check starting with.
R.startsWith('a', 'abc')
// trueGet the sum.
R.sum.run(R.with(1, 2, 3))
// 6Get the elements except the first.
R.tail.run(R.with(1, 2, 3))
// (2, 3)Take the first N elements.
R.take.run(1, 'abc')
// aTake the first N elements from right.
R.takeRight.run(1, 'abc')
// cTake elements from right until not satisfied.
R.takeRightWhile.run(R.equals.apply('a'), 'abc')
//Take elements until not satisfied.
R.takeWhile.run(R.equals.apply('a'), 'abc')
// aInvoke a function for N times.
R.times.run(3, R.identity)
// (0, 1, 2)Convert a map to a list of pairs.
R.toPairs.run(new Map{ 'name' => 'test' })
// (Pair:[fst=name, snd=test]) Make a union of the two objects.
R.union.run(R.with(1, 2, 3), R.with(2, 3, 4))
// (2, 3, 4, 1)Get a unique collection of the elements.
R.uniq.run(R.with(1, 2, 2))
// (1, 2)Flatten the elements by one level.
R.unnest.run(R.with(1, R.with(2, 3)))
// (1, 2, 3)Same with difference.
Make an xor of the two objects.
R.xor.run(R.with(1, 2, 3), R.with(2, 3, 4))
// (4, 1)Zip two collections to create a list of pairs.
R.zip.run(R.with('a', 'b'), R.with(1, 2))
// (Pair:[fst=a, snd=1], Pair:[fst=b, snd=2])Zip two collections to create a map.
R.zipObj.run(R.with('a', 'b'), R.with(1, 2))
// {a=1, b=2}Contribute on Github! Edit this section.