package melange

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

Belt.MutableStack

An FILO(first in last out) stack data structure

type 'a t = {
  1. mutable root : 'a opt_cell;
}
and 'a opt_cell = 'a cell option
and 'a cell = {
  1. head : 'a;
  2. tail : 'a opt_cell;
}
val make : unit -> 'a t
val clear : 'a t -> unit
val copy : 'a t -> 'a t
val push : 'a t -> 'a -> unit
val topUndefined : 'a t -> 'a Js.Undefined.t
val top : 'a t -> 'a option
val isEmpty : 'a t -> bool
val popUndefined : 'a t -> 'a Js.Undefined.t
val pop : 'a t -> 'a option
val lengthAux : 'a cell -> int -> int
val size : 'a t -> int
val iterAux : 'a opt_cell -> ('a -> unit) Js.Fn.arity1 -> unit
val forEachU : 'a t -> ('a -> unit) Js.Fn.arity1 -> unit
val forEach : 'a t -> ('a -> unit) -> unit
val dynamicPopIterU : 'a t -> ('a -> unit) Js.Fn.arity1 -> unit
val dynamicPopIter : 'a t -> ('a -> unit) -> unit
OCaml

Innovation. Community. Security.