NesSeqinclude module type of Stdlib.Seqtype !'a t = unit -> 'a nodeval is_empty : 'a t -> boolval length : 'a t -> intval iter : ('a -> unit) -> 'a t -> unitval fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'accval iteri : (int -> 'a -> unit) -> 'a t -> unitval fold_lefti : ('acc -> int -> 'a -> 'acc) -> 'acc -> 'a t -> 'accval find : ('a -> bool) -> 'a t -> 'a optionval find_index : ('a -> bool) -> 'a t -> int optionval find_map : ('a -> 'b option) -> 'a t -> 'b optionval find_mapi : (int -> 'a -> 'b option) -> 'a t -> 'b optionval empty : 'a tval return : 'a -> 'a tval init : int -> (int -> 'a) -> 'a tval unfold : ('b -> ('a * 'b) option) -> 'b -> 'a tval repeat : 'a -> 'a tval forever : (unit -> 'a) -> 'a tval iterate : ('a -> 'a) -> 'a -> 'a tval of_dispenser : (unit -> 'a option) -> 'a tval to_dispenser : 'a t -> unit -> 'a optionval ints : int -> int tval for_all : ('a -> bool) -> 'a t -> boolfor_all p [a1; ...; an; ...] checks if all elements of the (possibly infinite) sequence satisfy the predicate p. That is, it returns (p a1) && (p a2) && ... && (p an) && .... It returns false as soon as possible.
val exists : ('a -> bool) -> 'a t -> boolexists p [a1; ...; an; ...] checks if at least one element of the (possibly infinite) sequence satisfies the predicate p. That is, it returns (p a1) || (p a2) || ... || (p an) || .... It returns true as soon as possible.