adjust
Update the element at index with the function.
R.with(1, 2, 3).adjust(R.add.apply(1), 1).debug(); // (1, 3, 3)
Update the element at index with the function.
R.with(1, 2, 3).adjust(R.add.apply(1), 1).debug(); // (1, 3, 3)
Check if all elements match the predicate.
R.with(1, 2, 3).all(R.equals.apply(1)).debug(); // false
Append the element to the elements.
R.with(1, 2, 3).append(4).debug(); // (1, 2, 3, 4)
Associate the value to the key.
R.withObj('name', 'value').assoc('name', 'newValue').debug(); // {name=newValue}
Return a new string with the first letter in uppercase.
R.of('cat').capitalize().debug(); // Cat
Return a value that is limited between the min and the max.
R.of(4).clamp(1, 3).debug(); // 3
Remove null values from the elements.
R.with('a', null, 0).compact().debug();
// (a, 0)
Concatenate the other.
R.with(1, 2, 3).concat(R.with(4, 5, 6)).debug();
Check if the target is contained.
R.with(1, 2, 3).contains(2).debug(); // true
Check if the target is contained by the predicate.
R.with(1, 2, 3).containsBy(R.equals, 2).debug(); // true
Check if the key is contained.
R.withObj('name', 'test').containsKey('name').debug(); // true
Get a result of count mapped by the key.
R.with(1, 2, 2).countBy(R.identity).debug();
Print debug information.
R.with(1, 2).debug(); // (1, 2)
Get the default value.
R.of(null).defaultTo(3).debug(); // 3
Do a difference with the other object.
R.with(1, 2, 3).difference(R.with(2, 3, 4)).debug(); // (1)
Remove the value mapped by the key.
R.withObj('name', 'value').dissoc('name').debug(); // {}
Get a clone.
R.with(1, 2, 3).doClone().debug(); // (1, 2, 3)
Insert the element at the index.
R.with(1, 2, 3).doInsert(1, 'x').debug(); // (1, x, 2, 3)
Insert all the elements at the index.
R.with(1, 2, 3).doInsertAll(1, R.with('x', 'y')).debug(); // (1, x, y, 2, 3)
Join the elements with the separator.
R.with(1, 2, 3).doJoin('-').debug(); // 1-2-3
Map a function over the elements.
R.with(1, 2, 3).doMap(R.add.apply(1)).debug(); // (2, 3, 4)
Merge the source.
R.withObj('name', 'test').doMerge(R.withObj('name', 'newTest')).debug();
// {name=newTest}
Update the element at the specified index.
R.with(1, 2, 3).doUpdate(1, 3).debug(); // (1, 3, 3)
Drop the first N elements.
R.with(1, 2, 3).drop(2).debug(); // (3)
Drop the first N elements from right.
R.with(1, 2, 3).dropRight(2).debug(); // (1)
Drop from right until the predicate is not satisfied.
R.with(1, 2, 3).dropRightWhile(R.equals.apply(1)).debug(); // (1, 2, 3)
Drop until the predicate is not satisfied.
R.with(1, 2, 3).dropWhile(R.equals.apply(1)).debug(); // (2, 3)
Check if the elements end with the value.
R.of('abc').endsWith('bc').debug(); // true
Check if every element matches the predicate.
R.with(1, 2, 3).every(R.equals.apply(1)).debug(); // false
Apply the function to the value mapped by the same key and calculate the evolved object.
R.withObj('name', 'test').evolve(new Map{ 'name' => R.append.apply('more') }).debug();
// {name=testmore}
Call the function to filter the elements of instance R.
R.with(1, 2, 3).filter(R.equals.apply(2)).debug(); // (2)
R.with(new Account(Description = 'desc'), new Account()).filter('Description').debug(); // (Account:{Description=desc})
R.with(new Account(Description = 'desc'), new Account()).filter('Description', 'desc').debug(); // (Account:{Description=desc})
R.with(new Account(Description = 'desc'), new Account()).filter(new Map{ 'Description' => 'desc' }).debug();
// (Account:{Description=desc})
Find the first element that satisfies the predicate.
R.with(1, 2, 3).find(R.equals.apply(2)).debug(); // 2
Find the index of the first element that matches the predicate.
R.with(1, 2, 3).findIndex(R.equals.apply(2)).debug(); // 1
Find the first element that satisfies the predicate from last.
R.with(1, 2, 3).findLast(R.equals.apply(2)).debug(); // 2
Find the index of the first element that matches the predicate from last.
R.with(1, 2, 3).findLastIndex(R.equals.apply(2)).debug(); // 1
Get the first element.
R.with(1, 2, 3).first().debug(); // 1
Flatten the elements recursively.
R.with(1, new List