[erlang-questions] Updating a map

Oliver Korpilla Oliver.Korpilla@REDACTED
Wed Jan 30 13:48:28 CET 2019

PS - maps:from_list/1 might be also what you are looking for. 

Gesendet: Mittwoch, 30. Januar 2019 um 13:47 Uhr
Von: "Oliver Korpilla" <Oliver.Korpilla@REDACTED>
An: "Donald Steven" <t6sn7gt@REDACTED>
Cc: "Erlang Questions" <erlang-questions@REDACTED>
Betreff: Re: [erlang-questions] Updating a map
Hello, Donald.

You could use lists:foldr/3 to insert a list of key values into a map.

You would use the map itself as a the accumulator.

Best regards,

Gesendet: Mittwoch, 30. Januar 2019 um 13:27 Uhr
Von: "Donald Steven" <t6sn7gt@REDACTED>
An: "Erlang Questions" <erlang-questions@REDACTED>
Betreff: [erlang-questions] Updating a map
The documentation for maps:update states:  update(Key, Value, Map1) ->
Map2, but since update has an arity of 3, this doesn't work: 
update(Key1, Value1, Key2, Value2, Map1) -> Map2.  Is there an
other-than one-by-one-sequential-update to update more than one
key-value in one shot?



erlang-questions mailing list
erlang-questions mailing list

More information about the erlang-questions mailing list