Module Kwstream

module Kwstream: sig .. end

Stream Functions


Author(s): Keith Waclena

val length : 'a Stream.t -> int
compute the length of a stream, forcing the entire stream
str : a stream
val lines : ?bufsize:int -> char Stream.t -> string Stream.t
convert a stream of char to a stream of lines (strings)
bufsize : size of internal line buffer (default 64)
str : char stream
val numlines : ?bufsize:int -> char Stream.t -> (int * string) Stream.t
val map : ('a -> 'b) -> 'a Stream.t -> 'b Stream.t
map a function across a stream, returning a stream
f : unary function applied to each element of the stream
val fold : ('a -> 'b -> 'a) -> 'a -> 'b Stream.t -> 'a
val iter : ('a -> unit) -> 'a Stream.t -> unit
val to_list : 'a Stream.t -> 'a list
convert a stream to a list, forcing the entire stream
str : a stream