[erlang-questions] Can Pid be maps key ?
月忧茗
yueyoum@REDACTED
Mon May 18 08:01:10 CEST 2015
Can Pid be maps key ?
Build maps from #{} syntax, The error says Pid can not be key.
Bug build with maps module, Pid can be key.
18> 18> Pid = self().
<0.39.0>19> #{Pid => 1}.
* 1: illegal use of variable 'Pid' in map20> 20> M1 =
maps:from_list([{Pid, 1}]).
#{<0.39.0> => 1}21> 21> #{Pid := V} = M1.
* 2: illegal use of variable 'Pid' in map22> 22>
maps:get(Pid, M1).1
--
My GitHub
https://github.com/yueyoum
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150518/866b22db/attachment.htm>
More information about the erlang-questions
mailing list