Radix.more

You're seeing just the function more, go back to Radix module for more information.

Specs

more(tree(), key()) :: [{key(), value()}]

Returns all key,value-pair(s) where the given search key is a prefix for a stored key.

Collects key,value-entries where the stored key is the same or more specific.

Example

iex> elements = [
...>  {<<1, 1>>, 16},
...>  {<<1, 1, 0>>, 24},
...>  {<<1, 1, 0, 0>>, 32},
...>  {<<1, 1, 1, 1>>, 32}
...> ]
iex> t = new(elements)
iex>
iex> more(t, <<1, 1, 0>>)
[{<<1, 1, 0, 0>>, 32}, {<<1, 1, 0>>, 24}]
#
iex> more(t, <<1, 1, 1>>)
[{<<1, 1, 1, 1>>, 32}]
#
iex> more(t, <<2>>)
[]