Find an optimal solution using backtracking.
Compare a and b lexicographically by applying each fun to them. For unary functions compares fun(a) < fun(b).
Returns array filtered in-place.
Get the first element in range assuming it to be non-empty.
Get the last element in range assuming it to be non-empty.
Order a and b lexicographically by applying each fun to them. For unary functions compares fun(a) < fun(b).
Replaces the first occurrence of needle by replacement in array if present. Modifies array.
Slices an input array into slices of equivalent adjacent elements. In other languages this is often called partitionBy, groupBy or sliceWhen.
Return the prefix of haystack where pred is not satisfied.
Returns array uniqified in-place.
Returns one of a collection of expressions based on the value of the switch expression.
Some additional alogorithm functions.