Lazy_listLazy lists.
include Core.Monad.S with type 'a t := 'a tval return : 'a 'i 'p 'q. 'a -> 'a tConvert a value to a t.
Sequences computations. bind t ~f computes f v for value(s) v in t. Well-behaved monads satisfy these "laws" (where ( >>= ) is the infix bind operator):
map t ~f is equivalent to bind t ~f:(fun x -> return (f x))return x >>= f is equivalent to f xt >>= return is equivalent to t(t >>= f) >>= g is equivalent to t >>= fun x -> f x >>= gCombines nested t into just one layer. Equivalent to bind t ~f:Fn.id.
Ignores contained values of t. Equivalent to map t ~f:ignore.
module Monad_infix : sig ... endmodule Let_syntax : sig ... endval empty : unit -> 'a tval is_empty : 'a t -> boolval length : 'a t -> intval nth : 'a t -> int -> 'a optionval find : f:('a -> bool) -> 'a t -> 'a optionval fold_left : f:('a -> 'b -> 'a) -> init:'a -> 'b t -> 'aval fold_right : f:('a -> 'b -> 'b) -> 'a t -> init:'b -> 'bval foldr : 'a t -> f:('a -> 'b Core.Lazy.t -> 'b) -> init:'b -> 'b Core.Lazy.tval iter : 'a t -> f:('a -> unit) -> unitval of_iterator : curr:('a -> 'b option) -> next:('a -> 'a) -> init:'a -> 'b tval build : f:('s -> ('a * 's) option) -> seed:'s -> 'a tval unfold : f:('a -> 'a option) -> init:'a -> 'a tval uniter : f:(unit -> 'a option) -> 'a tval of_list : 'a list -> 'a tval to_rev_list : 'a t -> 'a listval to_list : 'a t -> 'a listval of_array : 'a array -> 'a tval to_array : 'a t -> 'a arraymodule Of_container : sig ... endmodule Iterator : sig ... end