Dict

This module is deprecated. Use Map or Keyword modules instead.

Generic API for dictionaries.

If you need a general dictionary, use the Map module. If you need to manipulate keyword lists, use Keyword.

To convert maps into keywords and vice-versa, use the new function in the respective modules.

Summary

Types

key()
t()
value()

Functions

delete(dict, key) deprecated
drop(dict, keys) deprecated
empty(dict) deprecated
equal?(dict1, dict2) deprecated
fetch(dict, key) deprecated
fetch!(dict, key) deprecated
get(dict, key, default \\ nil) deprecated
get_and_update(dict, key, fun) deprecated
get_lazy(dict, key, fun) deprecated
has_key?(dict, key) deprecated
keys(dict) deprecated
merge(dict1, dict2) deprecated
merge(dict1, dict2, fun) deprecated
pop(dict, key, default \\ nil) deprecated
pop_lazy(dict, key, fun) deprecated
put(dict, key, val) deprecated
put_new(dict, key, val) deprecated
put_new_lazy(dict, key, fun) deprecated
size(dict) deprecated
split(dict, keys) deprecated
take(dict, keys) deprecated
to_list(dict) deprecated
update(dict, key, initial, fun) deprecated
update!(dict, key, fun) deprecated
values(dict) deprecated

Types

key()

key() :: any()

t()

t() :: list() | map()

value()

value() :: any()

Functions

delete(dict, key)

delete(t(), key()) :: t()
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

drop(dict, keys)

drop(t(), [key()]) :: t()
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

empty(dict)

empty(t()) :: t()
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

equal?(dict1, dict2)

equal?(t(), t()) :: boolean()
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

fetch(dict, key)

fetch(t(), key()) :: value()
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

fetch!(dict, key)

fetch!(t(), key()) :: value()
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

get(dict, key, default \\ nil)

get(t(), key(), value()) :: value()
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

get_and_update(dict, key, fun)

get_and_update(t(), key(), (value() -> {value(), value()})) ::
  {value(), t()}
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

get_lazy(dict, key, fun)

get_lazy(t(), key(), (() -> value())) :: value()
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

has_key?(dict, key)

has_key?(t(), key()) :: boolean()
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

keys(dict)

keys(t()) :: [key()]
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

merge(dict1, dict2)

merge(t(), t()) :: t()
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

merge(dict1, dict2, fun)

merge(t(), t(), (key(), value(), value() -> value())) :: t()
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

pop(dict, key, default \\ nil)

pop(t(), key(), value()) :: {value(), t()}
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

pop_lazy(dict, key, fun)

pop_lazy(t(), key(), (() -> value())) :: {value(), t()}
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

put(dict, key, val)

put(t(), key(), value()) :: t()
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

put_new(dict, key, val)

put_new(t(), key(), value()) :: t()
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

put_new_lazy(dict, key, fun)

put_new_lazy(t(), key(), (() -> value())) :: t()
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

size(dict)

size(t()) :: non_neg_integer()
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

split(dict, keys)

split(t(), [key()]) :: {t(), t()}
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

take(dict, keys)

take(t(), [key()]) :: t()
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

to_list(dict)

to_list(t()) :: list()
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

update(dict, key, initial, fun)

update(t(), key(), value(), (value() -> value())) :: t()
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

update!(dict, key, fun)

update!(t(), key(), (value() -> value())) :: t()
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

values(dict)

values(t()) :: [value()]
This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

© 2012 Plataformatec
Licensed under the Apache License, Version 2.0.
https://hexdocs.pm/elixir/1.8.2/Dict.html