BatStack

# Module BatStack

    module BatStack: sig .. end

Last-in first-out stacks.

This module implements stacks (LIFOs), with in-place modification.

This module extends Stdlib's Stack module, go there for documentation on the rest of the functions and types.
Author(s): Xavier Leroy (Base module), David Teller

    include BatEnum.Enumerable

    val enum : 'a Stack.t -> 'a BatEnum.t

`enum s` returns a destructive enumeration of the elements of stack `s`, from the most recently entered to the least recently entered. Reading the enumeration will progressively empty `s`.

    val of_enum : 'a BatEnum.t -> 'a Stack.t

`of_enum e` returns a new stack containing all the elements of `e`. This is equivalent to calling `push` with the first element of the enumeration, then with the second, etc.

###### Boilerplate code

Printing

    val print : ?first:string ->
           ?last:string ->
           ?sep:string ->
           ('a BatInnerIO.output -> 'b -> unit) ->
           'a BatInnerIO.output -> 'b Stack.t -> unit

    module Exceptionless: sig .. end