W3cubDocs

/Elixir 1.11

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

t()

Functions

delete(dict, key) deprecated
drop(dict, keys) deprecated
empty(dict) deprecated
fetch(dict, key) deprecated
fetch!(dict, key) deprecated
has_key?(dict, key) deprecated
keys(dict) deprecated
merge(dict1, dict2) deprecated
put(dict, key, val) deprecated
size(dict) deprecated
split(dict, keys) deprecated
take(dict, keys) deprecated
to_list(dict) deprecated
values(dict) deprecated

Types

key()

Specs

key() :: any()

t()

Specs

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

value()

Specs

value() :: any()

Functions

delete(dict, key)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

delete(t(), key()) :: t()

drop(dict, keys)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

drop(t(), [key()]) :: t()

empty(dict)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

empty(t()) :: t()

equal?(dict1, dict2)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

equal?(t(), t()) :: boolean()

fetch(dict, key)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

fetch(t(), key()) :: value()

fetch!(dict, key)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

fetch!(t(), key()) :: value()

get(dict, key, default \\ nil)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

get(t(), key(), value()) :: value()

get_and_update(dict, key, fun)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

get_and_update(t(), key(), (value() -> {value(), value()})) :: {value(), t()}

get_lazy(dict, key, fun)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

get_lazy(t(), key(), (() -> value())) :: value()

has_key?(dict, key)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

has_key?(t(), key()) :: boolean()

keys(dict)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

keys(t()) :: [key()]

merge(dict1, dict2)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

merge(t(), t()) :: t()

merge(dict1, dict2, fun)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

merge(t(), t(), (key(), value(), value() -> value())) :: t()

pop(dict, key, default \\ nil)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

pop(t(), key(), value()) :: {value(), t()}

pop_lazy(dict, key, fun)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

pop_lazy(t(), key(), (() -> value())) :: {value(), t()}

put(dict, key, val)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

put(t(), key(), value()) :: t()

put_new(dict, key, val)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

put_new(t(), key(), value()) :: t()

put_new_lazy(dict, key, fun)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

put_new_lazy(t(), key(), (() -> value())) :: t()

size(dict)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

size(t()) :: non_neg_integer()

split(dict, keys)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

split(t(), [key()]) :: {t(), t()}

take(dict, keys)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

take(t(), [key()]) :: t()

to_list(dict)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

to_list(t()) :: list()

update(dict, key, default, fun)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

update(t(), key(), value(), (value() -> value())) :: t()

update!(dict, key, fun)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

update!(t(), key(), (value() -> value())) :: t()

values(dict)

This function is deprecated. Use the Map module for working with maps or the Keyword module for working with keyword lists.

Specs

values(t()) :: [value()]

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