[erlang-questions] extending function clauses
Camille Troillard
tuscland@REDACTED
Sat Dec 20 11:30:25 CET 2008
Great tutorial, thanks !
On Sat, Dec 20, 2008 at 3:14 AM, Zvi <exta7@REDACTED> wrote:
>
> fixed another typo:
>
>
> Zvi wrote:
> >
> > Function caluses in Erlang are just syntactic shugar for case, i.e.
> >
> > f(Pattern1) -> E1;
> > f(Pattern2) -> E2;
> > ...
> > f(PatternN) -> EN.
> >
> > is equivalent to:
> >
>
> f(X) ->
> case X of
> Pattern1 -> E1;
> Pattern2 -> E2;
> ...
> PatternN -> EN
> end.
>
> --
> View this message in context:
> http://www.nabble.com/extending-function-clauses-tp21091060p21101155.html
> Sent from the Erlang Questions mailing list archive at Nabble.com.
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081220/bb2e5def/attachment.htm>
More information about the erlang-questions
mailing list