A simple polymorphic functional queue.
Amortized running times assumes that enqueue/dequeue are used sequentially, threading the changing Fqueue through the calls.
returns the bottom (most-recently enqueued element). Raises Empty
if no element is
found. Complexity: O(1)
like bot_exn
, but returns result optionally, without exception. Complexity: O(1)
Like bot_exn
, except returns top (least-recently enqueued element. Complexity:
O(1)
like top_exn
, but returns result optionally, without exception, Complexity: O(1)