Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Module Ocsigen_lib_base.Clist

module Clist : sig..end

Circular lists


type 'a t
type 'a node
val make : 'a -> 'a node
val create : unit -> 'a t
val insert : 'a t -> 'a node -> unit
val remove : 'a node -> unit
val value : 'a node -> 'a
val in_list : 'a node -> bool
val is_empty : 'a t -> bool
val iter : ('a -> unit) -> 'a t -> unit

Infinite iteration on circular lists

val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a

Infinite fold on circular lists (use with care!)