package containers

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module CCListLabels.RefSource

Sourcetype 'a t = 'a list ref
Sourceval push : 'a t -> 'a -> unit
Sourceval pop : 'a t -> 'a option
Sourceval pop_exn : 'a t -> 'a

Unsafe version of pop.

  • raises Failure

    if the list is empty.

Sourceval create : unit -> 'a t

Create a new list reference.

Sourceval clear : _ t -> unit

Remove all elements.

Sourceval lift : ('a list -> 'b) -> 'a t -> 'b

Apply a list function to the content.

Sourceval push_list : 'a t -> 'a list -> unit

Add elements of the list at the beginning of the list ref. Elements at the end of the list will be at the beginning of the list ref.

OCaml

Innovation. Community. Security.