package ocsigenserver

  1. Overview
  2. Docs

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!)

OCaml

Innovation. Community. Security.