Dextrin.OrderedMap (Dextrin v0.1.0)

Copy Markdown View Source

DXN ordered-map (@ordered %{ ... }) — order is part of the value's identity, unlike plain map. Wraps an ordered list of {key, value} pairs rather than a plain Elixir map, so insertion order survives structural == comparison.

Summary

Types

t()

@type t() :: %Dextrin.OrderedMap{pairs: [{term(), term()}]}

Functions

fetch(ordered_map, key)

@spec fetch(t(), term()) :: {:ok, term()} | :error

new(pairs)

@spec new([{term(), term()}]) :: t()

to_list(ordered_map)

@spec to_list(t()) :: [{term(), term()}]