Okasaki.Implementations.ConstantQueue (Okasaki v1.0.1) 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

Specs

empty(opts :: keyword()) :: t()

Specs

empty?(t()) :: boolean()

Specs

insert(t(), any()) :: t()

Specs

map(t(), (any() -> any())) :: t()

Callback implementation for FunLand.Mappable.map/2.

Specs

remove(t()) :: {:ok, {any(), t()}} | {:error, :empty}

Specs

size(t()) :: non_neg_integer()

Specs

to_list(t()) :: list()