[erlang-questions] best way to update a nested map

Caragea Silviu <>
Tue May 17 21:38:36 CEST 2016


Hello,

What's the best way to update a nested map ?

I tried something like :

M = #{ a => 1, c =>#{x => 1, y => 7}}.
M1 = M#{c}#{y => 4711}.

As described here:
http://www.erlang-factory.com/upload/presentations/779/WhereareweontheMap.pdf

But for some reason I get an error : syntax error before: '}'

Silviu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160517/38b45333/attachment.html>


More information about the erlang-questions mailing list