[erlang-questions] Funargs: Ruby-like blocks for Erlang
Fri Jul 22 03:01:35 CEST 2011
On Thu, Jul 21, 2011 at 5:25 PM, Jachym Holecek <freza@REDACTED>wrote:
> Please define what kind of correspondence you have in mind, and if you're
> going to mention presence of some symbols in Latin alphabet please explain
> why that matters at all.
I mean honestly, are you trolling me?
Tokens like "do" and "end" are words, or more specifically keywords. Tokens
like "->" are symbols. Believe it or not for most people groupings of
letters, as opposed to symbolic characters, actually has a significant
To me they're just syntactic items.
Can you think like a human instead of a lexer?
Let's have a look:
> fun (X) -> X end
> ^^^ ^^^
> One more look:
> fun (X) -> X; (Y) -> Y end
> ^^^ ^^^
> See? Happy now? :-)
No. Clause bodies are delimited by "->" and "end" with ";" as an optional
clause separator. The "fun" keyword is not the delimiter and can be used in
contexts where a fun has no clause body, such as fun module:function/arity.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions