ListDict

A Dict implementation that works on lists of two-items tuples.

This dictionary is only recommended for keeping a small amount of values. Other dict alternatives are more viable for keeping any other amount than a handful.

For more information about the functions and their APIs, please consult the Dict module.

Source

Summary

delete(dict, key)
drop(dict, keys)
empty(_dict)
equal?(dict, other)
fetch!(dict, key)
fetch(dict, key)
get(dict, key, default \\ nil)
has_key?(dict, key)
keys(dict)
merge(dict, enum, callback \\ fn _k, _v1, v2 -> v2 end)
new()

Returns a new ListDict, i.e. an empty list

new(pairs)

Creates a new ListDict from the given pairs

new(list, transform)

Creates a new ListDict from the given pairs via the given transformation function

pop(dict, key, default \\ nil)
put(dict, key, val)
put_new(dict, key, val)
reduce(list, arg2, fun)
size(dict)
split(dict, keys)
take(dict, keys)
to_list(dict)
update!(list1, key, fun)
update(list1, key, initial, fun)
values(dict)

Functions

delete(dict, key)
Source
drop(dict, keys)
Source
empty(_dict)
Source
equal?(dict, other)
Source
fetch(dict, key)
Source
fetch!(dict, key)
Source
get(dict, key, default \\ nil)
Source
has_key?(dict, key)
Source
keys(dict)
Source
merge(dict, enum, callback \\ fn _k, _v1, v2 -> v2 end)
Source
new()

Returns a new ListDict, i.e. an empty list.

Source
new(pairs)

Creates a new ListDict from the given pairs.

Source
new(list, transform)

Creates a new ListDict from the given pairs via the given transformation function.

Source
pop(dict, key, default \\ nil)
Source
put(dict, key, val)
Source
put_new(dict, key, val)
Source
reduce(list, arg2, fun)
Source
size(dict)
Source
split(dict, keys)
Source
take(dict, keys)
Source
to_list(dict)
Source
update(list1, key, initial, fun)
Source
update!(list1, key, fun)
Source
values(dict)
Source