<div dir="ltr">Hi group,<div>A quick question wrt pattern matching on maps. I am currently working my way through Joe's book and the following code from the book doesn't work:</div><div><br></div><div><p style="margin:0px;font-size:15px;font-family:Menlo">Henry8 = #{ class => king, born => 1491, died => 1547 }.</p>
<p style="margin:0px;font-size:15px;font-family:Menlo">#{born => 1491,class => king,died => 1547}</p>
<p style="margin:0px;font-size:15px;font-family:Menlo">19> #{ born => B } = Henry8.</p>
<p style="margin:0px;font-size:15px;font-family:Menlo">* 1: illegal pattern</p><p style="margin:0px;font-size:15px;font-family:Menlo"><br></p><p style="margin:0px">It's not liking the pattern matching lookup. Also "B" is unbound (I made sure of that). This is my version of Erlang:</p><p style="margin:0px"><br></p><p style="margin:0px;font-size:15px;font-family:Menlo">Erlang (BEAM) emulator version 6.2</p><p style="margin:0px">
</p><p style="margin:0px;font-size:15px;font-family:Menlo">Compiled on Wed Oct 29 16:24:27 2014</p><p style="margin:0px;font-size:15px;font-family:Menlo"><br></p><p style="margin:0px;font-size:15px;font-family:Menlo"><span style="font-family:arial,sans-serif;font-size:small">Any idea why this wouldn't work?</span><br></p><p style="margin:0px;font-size:15px;font-family:Menlo"><span style="font-family:arial,sans-serif;font-size:small"><br></span></p><p style="margin:0px;font-size:15px;font-family:Menlo"><span style="font-family:arial,sans-serif;font-size:small">Thank you,</span></p><p style="margin:0px;font-size:15px;font-family:Menlo"><span style="font-family:arial,sans-serif;font-size:small">Santosh</span></p></div></div>