HashDict
A key-value store.
The HashDict is implemented using tries, which grows in
space as the number of keys grows, working well with both
small and large set of keys. For more information about the
functions and their APIs, please consult the Dict module.
Summary
| delete(dict, key) | Callback implementation of |
| drop(dict, keys) | Callback implementation of |
| empty(arg1) | Callback implementation of |
| equal?(dict1, dict2) | Callback implementation of |
| fetch!(dict, key) | Callback implementation of |
| fetch(arg1, key) | Callback implementation of |
| get(dict, key, default \\ nil) | Callback implementation of |
| has_key?(dict, key) | Callback implementation of |
| keys(dict) | Callback implementation of |
| merge(dict1, dict2, fun \\ fn _k, _v1, v2 -> v2 end) | Callback implementation of |
| new() | Creates a new empty dict |
| new(enum) | Creates a new dict from the given enumerable |
| new(enum, transform) | Creates a new dict from the enumerable with the help of the transformation function |
| pop(dict, key, default \\ nil) | Callback implementation of |
| put(arg1, key, value) | Callback implementation of |
| put_new(dict, key, value) | Callback implementation of |
| reduce(arg1, acc, fun) | Callback implementation of |
| size(arg1) | Callback implementation of |
| split(dict, keys) | Callback implementation of |
| take(dict, keys) | Callback implementation of |
| to_list(dict) | Callback implementation of |
| update!(arg1, key, fun) | Callback implementation of |
| update(arg1, key, initial, fun) | Callback implementation of |
| values(dict) | Callback implementation of |
Functions
Callback implementation of Dict.merge/3.
Specs:
Creates a new dict from the given enumerable.
Examples
HashDict.new [{:b, 1}, {:a, 2}]
#=> #HashDict<[a: 2, b: 1]>
Specs:
Creates a new dict from the enumerable with the help of the transformation function.
Examples
HashDict.new ["a", "b"], fn x -> {x, x} end
#=> #HashDict<[{"a","a"},{"b","b"}]>