Module Enum.Labels


module Enum.Labels: sig .. end
Operations on Enum with labels.

This module overrides a number of functions of Enum by functions in which some arguments require labels. These labels are there to improve readability and safety and to let you change the order of arguments to functions. In every case, the behavior of the function is identical to that of the corresponding function of Enum.


val iter : f:('a -> unit) -> 'a Enum.t -> unit
val iter2 : f:('a -> 'b -> unit) -> 'a Enum.t -> 'b Enum.t -> unit
val exists : f:('a -> bool) -> 'a Enum.t -> bool
val for_all : f:('a -> bool) -> 'a Enum.t -> bool
val fold : f:('a -> 'b -> 'a) -> init:'a -> 'b Enum.t -> 'a
val fold2 : f:('a -> 'b -> 'c -> 'c) ->
init:'c -> 'a Enum.t -> 'b Enum.t -> 'c
val iteri : f:(int -> 'a -> unit) -> 'a Enum.t -> unit
val iter2i : f:(int -> 'a -> 'b -> unit) -> 'a Enum.t -> 'b Enum.t -> unit
val foldi : f:(int -> 'a -> 'b -> 'b) -> init:'b -> 'a Enum.t -> 'b
val fold2i : f:(int -> 'a -> 'b -> 'c -> 'c) ->
init:'c -> 'a Enum.t -> 'b Enum.t -> 'c
val find : f:('a -> bool) -> 'a Enum.t -> 'a
val take_while : f:('a -> bool) -> 'a Enum.t -> 'a Enum.t
val drop_while : f:('a -> bool) -> 'a Enum.t -> 'a Enum.t
val map : f:('a -> 'b) -> 'a Enum.t -> 'b Enum.t
val mapi : f:(int -> 'a -> 'b) -> 'a Enum.t -> 'b Enum.t
val filter : f:('a -> bool) -> 'a Enum.t -> 'a Enum.t
val filter_map : f:('a -> 'b option) -> 'a Enum.t -> 'b Enum.t
val from : f:(unit -> 'a) -> 'a Enum.t
val from_while : f:(unit -> 'a option) -> 'a Enum.t
val from_loop : init:'a -> f:('a -> 'b * 'a) -> 'b Enum.t
val seq : init:'a -> f:('a -> 'a) -> cnd:('a -> bool) -> 'a Enum.t
val unfold : init:'a -> f:('a -> ('b * 'a) option) -> 'b Enum.t
val init : int -> f:(int -> 'a) -> 'a Enum.t
val switch : f:('a -> bool) -> 'a Enum.t -> 'a Enum.t * 'a Enum.t
val compare : ?cmp:('a -> 'a -> int) -> 'a Enum.t -> 'a Enum.t -> int
compare ~cmp a b compares enumerations a and b by lexicographical order using comparison cmp.
Returns compare cmp a' b', where a' and b' are respectively equal to a and b without their first element, if both a and b are non-empty and cmp x y = 0, where x is the first element of a and y is the first element of b
cmp : a comparison function. If left unspecified, Standard.compare is used.
module Enum.Labels.LExceptionless: sig .. end