mirror of
https://github.com/c-cube/iter.git
synced 2025-12-06 03:05:29 -05:00
doc
This commit is contained in:
parent
d822d023a2
commit
8983f3410a
1 changed files with 6 additions and 2 deletions
|
|
@ -65,10 +65,14 @@ val init : (int -> 'a) -> 'a t
|
||||||
|
|
||||||
val cons : 'a -> 'a t -> 'a t
|
val cons : 'a -> 'a t -> 'a t
|
||||||
(** [cons x l] yields [x], then yields from [l].
|
(** [cons x l] yields [x], then yields from [l].
|
||||||
Same as [append (singleton x) l] *)
|
Same as [append (singleton x) l].
|
||||||
|
|
||||||
|
Caution: it is advised not to build long iterators out of [cons],
|
||||||
|
because it's inefficient. Each additional [cons x i] adds one
|
||||||
|
layer of function call per item traversed in [i]. *)
|
||||||
|
|
||||||
val snoc : 'a t -> 'a -> 'a t
|
val snoc : 'a t -> 'a -> 'a t
|
||||||
(** Same as {!cons} but yields the element after iterating on [l] *)
|
(** Same as {!cons} but yields the element after iterating on [l]. *)
|
||||||
|
|
||||||
val return : 'a -> 'a t
|
val return : 'a -> 'a t
|
||||||
(** Synonym to {!singleton} *)
|
(** Synonym to {!singleton} *)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue