B00_std.List
Lists.
List
include module type of Stdlib.List
find_map f l
is the first element of l
such that f v
is Some r
or None
otherwise.
Note. Available in 4.10.
concat_map f l
maps l
with f
and concatenates the result. Tail recursive.
Note. Available in 4.10.
val classify : ?cmp_elts:('a -> 'a -> int) -> ?cmp_classes:('b -> 'b -> int) ->
classes:('a -> 'b list) -> 'a list -> ('b * 'a list) list
classify ~cmp_elts ~cmp_classes ~classes els
bins elements els
into classes as determined by classes
. cmp_elts
is used to compare elements and cmp_classes
to compare classes, both default to compare
.