[erlang-questions] conditional expressions
Sat Nov 15 19:17:52 CET 2008
1> case  of  -> X = aaa; X -> ok end.
2> case bbb of  -> X = aaa; X -> ok end.
** exception error: no case clause matching bbb
am I missing something?
On Sun, Nov 16, 2008 at 4:42 AM, mats cronqvist <masse@REDACTED> wrote:
> strangely, this also works;
> case foo() of
>  -> X = bar();
> X -> ok
> as long as X is bound in each clause, you're golden.
> this might qualify as a gotcha.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions