[erlang-questions] Funargs: Ruby-like blocks for Erlang

Tony Arcieri <>
Fri Jul 22 01:58:24 CEST 2011


On Thu, Jul 21, 2011 at 3:48 PM, Richard O'Keefe <> wrote:

> And YEEK!  The argument list here

looks like nothing else in Erlang whatever!
> Surely surely surely Erlang should look like Erlang!
>
>    lists:map([1,2,3,4,5]) do (N) -> N*2 end
>

The "end" keyword, in all other cases in Erlang, is paired with a
corresponding keyword, like "if", or "case", or "receive", or "try". Only in
funs is "end" paired with the stabby symbol. If anything Erlang's fun syntax
is inconsistent.

-- 
Tony Arcieri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110721/8d3d9750/attachment.html>


More information about the erlang-questions mailing list