Module type Stream.S
type t= private{id : int;unique ID of the stream
penalty : int;heuristic penalty
mutable stm : C.t option OSeq.t;the stream itself
}
exceptionEmpty_StreamexceptionDrip_n_Unfinished of C.t option list * int
Basics
val make : ?penalty:int -> C.t option OSeq.t -> tval equal : t -> t -> boolval compare : t -> t -> intval hash : t -> intval id : t -> intval is_empty : t -> boolval penalty : t -> intval drip : t -> C.t optionRemove the first element in the stream and return it.
- raises Empty_Stream
if the stream is empty
val drip_n : t -> int -> int -> C.t option listAttempt to remove the n first elements in the stream and return them. Return less if the guard is reached.
- raises Drip_n_Unfinished(cl,n)
where cl is the list of elements already found and n the number of elements if the stream contains less than n elements
IO
val pp : t CCFormat.printer