Module Kwstack

module Kwstack: sig .. end

type 'a t 
exception Underflow
val stack : 'a t
val empty : 'a t -> bool
val depth : 'a t -> int
val push : 'a -> 'a t -> 'a t
val top : 'a t -> 'a
val pop : 'a t -> 'a * 'a t
val reverse : 'a t -> 'a t
val concat : 'a t -> 'a t -> 'a t
val fold : ('a -> 'b -> 'b) -> 'b -> 'a t -> 'b
val map : ('a -> 'b) -> 'a t -> 'b t
val iter : ('a -> unit) -> 'a t -> unit
val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list