filter : ('a -> bool) -> 'a list -> 'a list
Filters a list to the sublist of elements satisfying a predicate.
filter p l applies p to every element of l, returning a list of those
that satisfy p, in the order they appeared in the original list.
- FAILURE CONDITIONS
Fails if the predicate fails on any element.
- SEE ALSO
mapfilter, partition, remove.