package sek

  1. Overview
  2. Docs

Module Emulated.StackSource

The submodule Stack is a replacement for OCaml's standard Stack module, where a stack is implemented as an ephemeral sequence. Elements are pushed and popped at the front end of the sequence.

Sourcetype 'a t = 'a E.t
Sourceexception Empty
Sourceval create : 'a -> 'a t

create requires a default value. The functor SupplyDefault remedies this problem.

Sourceval push : 'a -> 'a t -> unit
Sourceval pop : 'a t -> 'a
Sourceval pop_opt : 'a t -> 'a option
Sourceval top : 'a t -> 'a
Sourceval top_opt : 'a t -> 'a option
Sourceval clear : 'a t -> unit
Sourceval copy : 'a t -> 'a t
Sourceval is_empty : 'a t -> bool
Sourceval length : 'a t -> int
Sourceval iter : ('a -> unit) -> 'a t -> unit
Sourceval fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
Sourceval to_seq : 'a t -> 'a Seq.t
Sourceval add_seq : 'a t -> 'a Seq.t -> unit
Sourceval of_seq : 'a -> 'a Seq.t -> 'a t
OCaml

Innovation. Community. Security.