Think about it not as whole function but as set of clauses. It make sense this way.<br><br><div class="gmail_quote">On Fri, May 13, 2011 at 11:43 AM, Justus <span dir="ltr"><<a href="mailto:mapandfold@gmail.com">mapandfold@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi all,<br>
<br>
I come to a question on function declaration syntax: why does function<br>
name appear in each clause?<br>
<br>
Name(Pattern11,...,Pattern1N) [when GuardSeq1] -><br>
Body1;<br>
...;<br>
Name(PatternK1,...,PatternKN) [when GuardSeqK] -><br>
BodyK.<br>
<br>
It does not provide any information, except that one might make silly mistakes.<br>
<br>
If omitting it, a new problem is how to indent clauses properly and<br>
beautifully.<br>
<br>
Name(Pattern11,...,Pattern1N) [when GuardSeq1] -><br>
Body1;<br>
(PatternK1,...,PatternKN) [when GuardSeqK] -><br>
BodyK.<br>
<font color="#888888"><br>
--<br>
Best Regards,<br>
Justus<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Alexander<br><br>