Created
October 7, 2016 10:45
-
-
Save edennis/171e8425b528d2dad614bb6930095801 to your computer and use it in GitHub Desktop.
pattern matching
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iex(10)> m = %{a: 1} | |
%{a: 1} | |
iex(11)> %{a: 1} = %{a: 1, b: 2} | |
%{a: 1, b: 2} | |
iex(12)> ^m = %{a: 1, b: 2} | |
** (MatchError) no match of right hand side value: %{a: 1, b: 2} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment