Frama-C API - Make
Parameters
Signature
val create : unit -> t
Create a new empty stack.
val is_empty : t -> bool
Test whether the stack is empty or not.
val clear : t -> unit
Remove all the elements of a stack.
Return the top element of the stack. Raise Empty
if the stack is empty. Complexity: amortized O(1).
Return true
if the data exists in the stack and false
otherwise. Complexity: O(n).
Return all data of the stack satisfying the specified predicate. The order of the data in the input stack is preserved. Not tail recursive.
Return the first data of the stack satisfying the specified predicate.
Iter on all the elements from the top to the end of the stack. Not tail recursive.
Replace in-place all the elements of the stack by mapping the old one. Not tail recursive.
Fold on all the elements from the top to the end of the stack. Not tail recursive.
val length : t -> int