O(n) Construct a vector with at most n by repeatedly applying the
generator function to the a seed. The generator function yields Just the
next element and the new seed or Nothing if there are no more elements.

Partitioning

O(n) Split the vector in two parts, the first one containing those
elements that satisfy the predicate and the second one those that don't. The
relative order of the elements is preserved at the cost of a sometimes
reduced performance compared to unstablePartition.

O(n) Split the vector in two parts, the first one containing those
elements that satisfy the predicate and the second one those that don't.
The order of the elements is not preserved but the operation is often
faster than partition.