Batteries user guide : Batteries.Stream

`sig
type 'a t = 'a Stream.t
type 'a enumerable = 'a t
type 'a mappable = 'a t
exception Failure
exception Error of string
val from : (int -> 'a option) -> 'a t
val of_list : 'a list -> 'a t
val of_string : string -> char t
val of_channel : in_channel -> char t
val of_fun : (unit -> 'a) -> 'a t
val iter : ('a -> unit) -> 'a t -> unit
val foldl : ('a -> 'b -> 'a * bool option) -> 'a -> 'b t -> 'a
val foldr : ('a -> 'b lazy_t -> 'b) -> 'b -> 'a t -> 'b
val fold : ('a -> 'a -> 'a * bool option) -> 'a t -> 'a
val filter : ('a -> bool) -> 'a t -> 'a t
val empty : 'a t -> unit
val peek : 'a t -> 'a option
val junk : 'a t -> unit
val count : 'a t -> int
val npeek : int -> 'a t -> 'a list
val enum : 'a t -> 'a BatEnum.t
val of_enum : 'a BatEnum.t -> 'a t
val of_input : BatIO.input -> char t
val to_list : 'a t -> 'a list
val to_string : char t -> string
val to_string_fmt : ('a -> string, unit, string) format -> 'a t -> string
val to_string_fun : ('a -> string) -> 'a t -> string
val on_output : 'a BatIO.output -> char t -> unit
val map : ('a -> 'b) -> 'a t -> 'b t
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val scanl : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a t
val scan : ('a -> 'a -> 'a) -> 'a t -> 'a t
val concat : 'a t t -> 'a t
val take : int -> 'a t -> 'a t
val drop : int -> 'a t -> 'a t
val take_while : ('a -> bool) -> 'a t -> 'a t
val drop_while : ('a -> bool) -> 'a t -> 'a t
val dup : 'a t -> 'a t * 'a t
val comb : 'a t * 'b t -> ('a * 'b) t
val split : ('a * 'b) t -> 'a t * 'b t
val merge : (bool -> 'a -> bool) -> 'a t * 'a t -> 'a t
val switch : ('a -> bool) -> 'a t -> 'a t * 'a t
val cons : 'a -> 'a t -> 'a t
val apnd : 'a t -> 'a t -> 'a t
val is_empty : 'a t -> bool
val next : 'a t -> 'a
module StreamLabels :
sig
val iter : f:('a -> unit) -> 'a t -> unit
val to_string_fmt :
fmt:('a -> string, unit, string) format -> 'a t -> string
val to_string_fun : fn:('a -> string) -> 'a t -> string
val foldl : f:('a -> 'b -> 'a * bool option) -> init:'a -> 'b t -> 'a
val foldr : f:('a -> 'b lazy_t -> 'b) -> init:'b -> 'a t -> 'b
val fold : f:('a -> 'a -> 'a * bool option) -> init:'a t -> 'a
val filter : f:('a -> bool) -> 'a t -> 'a t
val map : f:('a -> 'b) -> 'a t -> 'b t
val map2 : f:('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val scanl : f:('a -> 'b -> 'a) -> 'a -> 'b t -> 'a t
val scan : f:('a -> 'a -> 'a) -> 'a t -> 'a t
val take_while : f:('a -> bool) -> 'a t -> 'a t
val drop_while : f:('a -> bool) -> 'a t -> 'a t
val merge : f:(bool -> 'a -> bool) -> 'a t * 'a t -> 'a t
val switch : f:('a -> bool) -> 'a t -> 'a t * 'a t
end
val iapp : 'a t -> 'a t -> 'a t
val icons : 'a -> 'a t -> 'a t
val ising : 'a -> 'a t
val lapp : (unit -> 'a t) -> 'a t -> 'a t
val lcons : (unit -> 'a) -> 'a t -> 'a t
val lsing : (unit -> 'a) -> 'a t
val sempty : 'a t
val slazy : (unit -> 'a t) -> 'a t
val dump : ('a -> unit) -> 'a t -> unit
end`