package lilis

  1. Overview
  2. Docs

A stream-like data structure should be lazy and support O(1) concatenation.

It should also be possible to store a datastructure in order to replicate it (to print it multiple time on screen, for example).

For clonable data-structures, we can have S.t identical to S.stored

type 'a t
type 'a stored
val singleton : 'a -> 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val expand : ('a -> 'b t) -> 'a t -> 'b t
val iter : ('a -> unit) -> 'a t -> unit
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
val of_list : 'a list -> 'a stored
val to_list : 'a t -> 'a list
val empty : 'a stored
val store : 'a t -> 'a stored
val gennew : 'a stored -> 'a t
OCaml

Innovation. Community. Security.