Prelude.Stack
Extension of Stack with functions to serialize to and deserialize from yojson
A Stack is a last-in-first-out collection of elements
Extension of Stack with functions to serialize to and deserialize from yojson
A Stack is a last-in-first-out collection of elements
Extension of Stack with functions to serialize to and deserialize from yojson
A Stack is a last-in-first-out collection of elements
include module type of struct include Stdlib.Stack end
val create : unit -> 'a t
val push : 'a -> 'a t -> unit
val pop : 'a t -> 'a
val pop_opt : 'a t -> 'a option
val drop : 'a t -> unit
val top : 'a t -> 'a
val top_opt : 'a t -> 'a option
val clear : 'a t -> unit
val is_empty : 'a t -> bool
val length : 'a t -> int
val iter : ('a -> unit) -> 'a t -> unit
val fold : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc
val to_seq : 'a t -> 'a Stdlib.Seq.t
val add_seq : 'a t -> 'a Stdlib.Seq.t -> unit
val of_seq : 'a Stdlib.Seq.t -> 'a t
val to_yojson : ('a -> Yojson.Safe.t) -> 'a t -> Yojson.Safe.t