Maps - decade old example

Reading a tutorial and found this 10 years old example (my shell):

Eshell V14.0.2 (press Ctrl+G to abort, type help(). for help)
1> Henry8 = #{ class => king, born => 1491, died => 1547}.
#{died => 1547,class => king,born => 1491}
2> #{ born => B} = Henry8.
* 1:9: illegal pattern

I think the last line should use := instead of =>

4> #{ born := B} = Henry8.
#{died => 1547,class => king,born => 1491}
5> B.
1491

Is this a typo or did the syntax change? I think maps came late to the language…

1 Like

Not typo - from the horse’s mouth - surprised maps were still in flux at that time.

http://erlang.org/pipermail/erlang-questions/2016-February/087606.html

2 Likes