Module BC_Stream


module BC_Stream: sig  end
some extensions to standard Stream

val of_array : 'a array -> 'a Stream.t
Build a stream from an array. (like we really need this, huh?).
val iteri : (int -> 'a -> unit) -> 'a Stream.t -> unit
Same as Stream.iter, but the function is applied to the index of the element as first argument, and the element itself as second argument.
val fold : ('a -> 'b -> 'a) -> 'a -> 'b Stream.t -> 'a
a fold for streams. Won't stop if streams are infinite length...
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b Stream.t -> 'a
Deprecated. use fold instead
a fold left for streams. Won't stop if streams are infinite length...
val of_lines : Pervasives.in_channel -> string Stream.t
a stream made with input_line on an input channel. Warning: Calls on the stream will change the input channel.
val of_file_lines : string -> string Stream.t
a stream of each line of a file.
val of_file_lines2 : string -> string Stream.t
The same as of_file_lines, except for ignoring comments and empty lines. comment lines begin with '#'.
val map : ('a Stream.t -> 'b) -> 'a Stream.t -> 'b Stream.t
a map on a stream. Warning: The mapping is destructive - calls on the new stream will change the old stream - so the old stream should not be used anymore.
val filter : ('a -> bool) -> 'a Stream.t -> 'a Stream.t
a filter on a stream. Warning: The filtering is destructive - calls on the new stream will change the old stream - so the old stream should not be used anymore.