Created
April 27, 2011 04:03
-
-
Save talentdeficit/943697 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
15> Z = fun(X) -> X = true end. | |
#Fun<erl_eval.6.13229925> | |
16> Z(false). | |
** exception error: no match of right hand side value true | |
17> try Z(false) catch error:badmatch -> ok end. | |
** exception error: no match of right hand side value true | |
18> try Z(false) catch error:Type -> Type end. | |
{badmatch,true} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
4> try Z(false) catch error:Type -> Type end.
{badmatch,true}
5> try Z(false) catch error:Type -> [Type] end.
[{badmatch,true}]
6> try Z(false) catch error:{badmatch,true} -> ok end.
ok