Module CCLazy_list
Lazy List
- since
- 0.17
val empty : 'a t
Empty list.
val return : 'a -> 'a t
Return a computed value.
val is_empty : _ t -> bool
Evaluate the head.
val length : _ t -> int
length l
returns the number of elements inl
, eagerly (linear time). Caution, will not terminate ifl
is infinite.
val cons : 'a -> 'a t -> 'a t
val head : 'a t -> ('a * 'a t) option
Evaluate head, return it, or
None
if the list is empty.
module Infix : sig ... end