Okasaki v0.4.0 Okasaki.Implementations.ConstantQueue View Source

Okasaki.ConstantQueue is a Purely Functional Queue that performs both insertion and removal at guaranteed O(1) (constant) time.

Link to this section Summary

Link to this section Types

Link to this section Functions

Link to this function empty(opts \\ []) View Source
empty(opts :: keyword) :: t
Link to this function empty?(constant_queue) View Source
empty?(t) :: boolean
Link to this function insert(queue, item) View Source
insert(t, any) :: t
Link to this function map(queue, fun) View Source
map(t, (any -> any)) :: t
Link to this function remove(queue) View Source
remove(t) :: {:ok, {any, t}} | {:error, :empty}
Link to this function size(constant_queue) View Source
size(t) :: non_neg_integer
Link to this function to_list(constant_queue) View Source
to_list(t) :: list