Owl_utils_stackval make : unit -> 'a tmake () creates an empty stack.
val push : 'a t -> 'a -> unitpush stack x pushes x into stack.
val pop : 'a t -> 'a optionpop stack pops the top element in stack. It returns None if the stack is empty.
val peek : 'a t -> 'a optionpeek stack returns the value of top element in stack but it does not remove the element from the stack. None is returned if the stack is empty.
val is_empty : 'a t -> boolReturns true if the stack is empty, otherwise false.
val mem : 'a t -> 'a -> boolmem stack x checks whether x exist in stack. The complexity is O(n) where n is the size of the stack.
val memq : 'a t -> 'a -> boolSimilar to mem but physical equality is used for comparing values.
val to_array : 'a t -> 'a arrayto_array stack converts the elements in stack into an array.