Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
partition : ('a -> bool) -> 'a list -> 'a list * 'a list
SYNOPSIS
Separates a list into two lists using a predicate.
DESCRIPTION
partition p l returns a pair of lists. The first list contains the elements
which satisfy p. The second list contains all the other elements.
FAILURE CONDITIONS
Never fails.
EXAMPLE
# partition (fun x -> x mod 2 = 0) (1--10);;
val it : int list * int list = ([2; 4; 6; 8; 10], [1; 3; 5; 7; 9])