Skip to content

Instantly share code, notes, and snippets.

@josevalim
Created April 28, 2014 05:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josevalim/02cd7214d3173c5c73bc to your computer and use it in GitHub Desktop.
Save josevalim/02cd7214d3173c5c73bc to your computer and use it in GitHub Desktop.
%% Just happens in the shell afaik
1> lists:map(fun(X) -> X#{price := 0} end, [#{hello => 0, price => nil}]).
** exception error: no match of right hand side value #{hello => 0,price => nil}
in function erl_eval:expr/5 (erl_eval.erl, line 248)
in call from lists:map/2 (lists.erl, line 1237)
2> (fun(X) -> X#{price := 0} end)(#{hello => 0, price => nil}).
#{hello => 0,price => 0}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment