Build a map with a custom function for aggregating collisions
Finds the nth smallest value in an unsorted list in O(n) time and O(n) space E.g., nth(List(3,2,4,1), 0) => 1 and nth(List(3,2,4,1), 2) => 3
Returns the powerset of a List
Returns the powerset of a List
If you don't care about ordering use Set(1,2,3).subsets.
Cartesian product of an arbitrary number of lists Iterating starts from the first list to the last list e.g.
Cartesian product of an arbitrary number of lists Iterating starts from the first list to the last list e.g. List(1,2), List(3,4) returns List(1,3), List(2,3), List(1,4), List(2,4)
Cartesian product of an arbitrary number of lists Iterating starts from the last list to the first list e.g.
Cartesian product of an arbitrary number of lists Iterating starts from the last list to the first list e.g. List(1,2), List(3,4) returns List(1,3), List(1,4), List(2,3), List(2,4)
Remove all elements from left that are in right
Like removeAll, but uses a key function to determine equality.
Like removeAll, but uses a key function to determine equality. Useful for using IDs to determine equality
Functions so simple their type signature determines their implementation
Zips with a binary operation