Support.Seqinclude 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 : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'aval iteri : (int -> 'a -> unit) -> 'a t -> unitval fold_lefti : ('b -> int -> 'a -> 'b) -> 'b -> 'a t -> 'bval for_all : ('a -> bool) -> 'a t -> boolval exists : ('a -> bool) -> 'a t -> boolval find : ('a -> bool) -> 'a t -> 'a optionval find_map : ('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 of_gen : (unit -> 'a option) -> 'a tof_gen g is the sequence obtained by sequentially invoking the effectful function g to produce the next element x when g () = Option.Some x.
If it is ever the case that g () = Option.None, then the resultant sequence has finite length.
val of_list : 'a list -> 'a tof_list l is the sequence obtained from the list l.
val to_list : 'a t -> 'a listto_list s converts s to a list. The sequence traversal happens immediately and will not terminate on infinite sequences.