partitionBy


Description:

public Pair<ArrayList<T>,ArrayList<T>> partitionBy (owned PredicateFunc<T> fn)

Partitions elements into two lists by a predicate.

The first list contains elements matching the predicate, and the second list contains the rest.

Parameters:

fn

the predicate function.

Returns:

a Pair of (matching, non-matching) lists.