Elixir v1.0.5 Map
A Dict implementation that works on maps.
Maps are key-value stores where keys are compared using
the match operator (===
). Maps can be created with
the %{}
special form defined in the Kernel.SpecialForms
module.
For more information about the functions in this module and
their APIs, please consult the Dict
module.
Summary
Functions
Callback implementation for Dict.delete/2
Callback implementation for Dict.drop/2
Callback implementation for Dict.equal?/2
Callback implementation for Dict.fetch/2
Callback implementation for Dict.fetch!/2
Converts a struct to map
Callback implementation for Dict.get/3
Callback implementation for Dict.has_key?/2
Callback implementation for Dict.keys/1
Callback implementation for Dict.merge/2
Callback implementation for Dict.merge/3
Returns a new empty map
Callback implementation for Dict.pop/3
Callback implementation for Dict.put/3
Callback implementation for Dict.put_new/3
Callback implementation for Dict.size/1
Callback implementation for Dict.split/2
Callback implementation for Dict.take/2
Callback implementation for Dict.to_list/1
Callback implementation for Dict.update/4
Callback implementation for Dict.update!/3
Callback implementation for Dict.values/1
Functions
Callback implementation for Dict.delete/2
.
Callback implementation for Dict.drop/2
.
Callback implementation for Dict.equal?/2
.
Callback implementation for Dict.fetch/2
.
Callback implementation for Dict.fetch!/2
.
Converts a struct to map.
It accepts the struct module or a struct itself and
simply removes the __struct__
field from the struct.
Example
defmodule User do
defstruct [:name]
end
Map.from_struct(User)
#=> %{name: nil}
Map.from_struct(%User{name: "john"})
#=> %{name: "john"}
Callback implementation for Dict.get/3
.
Callback implementation for Dict.has_key?/2
.
Callback implementation for Dict.keys/1
.
Callback implementation for Dict.merge/2
.
Callback implementation for Dict.merge/3
.
Callback implementation for Dict.pop/3
.
Callback implementation for Dict.put/3
.
Callback implementation for Dict.put_new/3
.
Callback implementation for Dict.size/1
.
Callback implementation for Dict.split/2
.
Callback implementation for Dict.take/2
.
Callback implementation for Dict.to_list/1
.
Callback implementation for Dict.update/4
.
Callback implementation for Dict.update!/3
.
Callback implementation for Dict.values/1
.