(** Stream type [t] is lazy by nature, and [desc] is its forced form. *)
(** Create a null stream *)
- val null_desc : Attr.t -> desc
- val cons_desc : Elem.t -> Attr.t -> t -> desc
+ val null_desc : attr -> desc
+ val cons_desc : elem -> attr -> t -> desc
(** Create a null/cons cell desc, useful for stream creation *)
- val peek : t -> (
Elem .t * t) option
+ val peek : t -> (lem * t) option
- val position : t -> Pos.t
+ val position : t -> pos
(** Attribute and Position of the head element or null *)
- val to_list : t -> Elem.t list
- val iter : (Elem.t -> unit) -> t -> unit
- val fold_right : (Elem.t -> 'a -> 'a) -> t -> 'a -> 'a
- val map : (Elem.t -> 'a) -> t -> 'a Spotlib.Stream.t
+ val to_list : t -> elem list
+ val iter : (elem -> unit) -> t -> unit
+ val fold_right : (elem -> 'a -> 'a) -> t -> 'a -> 'a
+ val map : (elem -> 'a) -> t -> 'a Spotlib.Stream.t
(** Iteration, folding and map *)
- val rev_between : t -> t ->
Elem .t list
+ val rev_between : t -> t -> lem list
(** [rev_between t1 t2] returns the elemens between the two steam positions [t1] and [t2].
[t2] must be a postfix of [t1].
The elements are returned in the reverse order in the stream.
This can be quite costy operation. Use with care.
- val between : t -> t ->
Elem .t list
+ val between : t -> t -> lem list
(** Same as [rev_between] but the elements are in the same ordered in the streams.
[between t1 t2] is actually defined as [List.rev (rev_between t1 t2)].
The same notes of [rev_between] apply to this function too.
+ include X with type elem := Elem.t
+ and type attr := Attr.t