View Source maps_in (maps_in v0.2.0)
Link to this section Summary
Functions
filter/3.
filtermap/3.
find/3.
fold/4.
foreach/3.
get/2.
get/3.
is_key/3.
iterator/2.
keys/2.
map/3.
merge/3.
merge_with/4.
put/3.
remove/3.
size/2.
take/3.
to_list/2.
update/3.
update_with/3.
update_with/4.
values/2.
with/3.
without/3.
Link to this section Functions
-spec filter(Path, Pred, Map1) -> Map2
when
Path :: [term()],
Pred :: fun((term(), term()) -> boolean()),
Map1 :: map(),
Map2 :: map().
-spec filtermap(Path, Fun, Map1) -> Map2
when
Path :: [term()],
Fun :: fun((term(), term()) -> boolean() | {true, term()}),
Map1 :: map(),
Map2 :: map().
-spec find(Key, Path, Map) -> {ok, Value} | error
when Key :: term(), Path :: [term()], Map :: #{Key => Value, _ => _}.
-spec fold(Fun, Init, Path, Map) -> Acc
when
Fun :: fun((Key, Value, AccIn) -> AccOut),
Init :: term(),
Path :: [term()],
Acc :: AccOut,
AccIn :: Init | AccOut,
Map :: #{Key => Value}.
-spec foreach(Fun, Path, Map) -> ok
when Fun :: fun((Key, Value) -> term()), Path :: [term()], Map :: #{Key => Value}.
-spec get(Path, Map) -> Value when Path :: [term()], Map :: map(), Value :: term().
-spec get(Path, Map, Default) -> Value | Default
when Path :: [term()], Map :: map(), Default :: term(), Value :: term().
-spec is_key(Key, Path, Map) -> boolean() when Key :: term(), Path :: [term()], Map :: map().
-spec iterator(Path, Map) -> Iterator when Path :: [term()], Map :: map(), Iterator :: maps:iterator().
-spec keys(Path, Map) -> Keys when Path :: [term()], Map :: map(), Keys :: [term()].
-spec map(Path, Fun, Map1) -> Map2
when Path :: [term()], Fun :: fun((term(), term()) -> term()), Map1 :: map(), Map2 :: map().
-spec merge(Map1, Path, Map2) -> Map3 when Map1 :: map(), Path :: [term()], Map2 :: map(), Map3 :: map().
-spec merge_with(Combiner, Map1, Path, Map2) -> Map3
when
Combiner :: fun((term(), term(), term()) -> term()),
Map1 :: map(),
Path :: [term()],
Map2 :: map(),
Map3 :: map().
-spec put(Path, Value, Map1) -> Map2
when Path :: [term()], Value :: term(), Map1 :: map(), Map2 :: map().
-spec remove(Key, Path, Map1) -> Map2 when Key :: term(), Path :: [term()], Map1 :: map(), Map2 :: map().
-spec size(Path, Map) -> non_neg_integer() when Path :: [term()], Map :: map().
-spec take(Key, Path, Map1) -> {Value, Map2} | error
when Key :: term(), Path :: [term()], Map1 :: map(), Value :: term(), Map2 :: map().
-spec to_list(Path, Map) -> [{Key, Value}] when Path :: [term()], Map :: #{Key => Value}.
-spec update(Path, Value, Map1) -> Map2
when Path :: [term()], Value :: term(), Map1 :: map(), Map2 :: map().
-spec update_with(Path, Fun, Map1) -> Map2
when Path :: [term()], Fun :: fun((term()) -> term()), Map1 :: map(), Map2 :: map().
-spec update_with(Path, Fun, Init, Map1) -> Map2
when
Path :: [term()],
Fun :: fun((term()) -> term()),
Init :: [term()],
Map1 :: map(),
Map2 :: map().
-spec values(Path, Map) -> Values when Path :: [term()], Map :: map(), Values :: [term()].
-spec with(Keys, Path, Map1) -> Map2
when Keys :: [term()], Path :: [term()], Map1 :: map(), Map2 :: map().
-spec without(Keys, Path, Map1) -> Map2
when Keys :: [term()], Path :: [term()], Map1 :: map(), Map2 :: map().