[erlang-questions] pattern matching & map

by by@REDACTED
Tue Nov 27 02:05:43 CET 2018


I believe below link would be a good reference.
https://bugs.erlang.org/plugins/servlet/mobile#issue/ERL-88
And yes, this feature is not yet implemented even in Erlang/OTP 21.
I encounter the same problem when I read the second edition of joe’s Erlang book.

Best Regards,
Randall

> 在 2018年11月26日,17:21,Oleg <lego12239@REDACTED> 写道:
> 
>  Hi, all.
> 
> I try to do the pattern matching in a function definition with maps:
> 
> add_prms([{Name, Val}|T], #{Name := Vals} = Prms) ->
> 
> But erlc says me:
> 
> variable 'Name' is unbound
> 
> Is this is not supported yet?
> 
> Erlang/OTP 20
> 
> -- 
> Олег Неманов (Oleg Nemanov)
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20181127/e92f374c/attachment.htm>


More information about the erlang-questions mailing list