remove : ('a -> bool) -> 'a list -> 'a * 'a list
- SYNOPSIS
-
Separates the first element of a list to satisfy a predicate from the rest of
the list.
- FAILURE CONDITIONS
-
Fails if no element satisfies the predicate. This will always be the case for
an empty list.
- EXAMPLE
-
# remove (fun x -> x >= 3) [1;2;3;4;5;6];;
val it : int * int list = (3, [1; 2; 4; 5; 6])
- SEE ALSO
-
partition, filter.