Hey Mario,

The capture operator today already has a few forms (arity or arguments) and
I think it would be better to keep it simple and not add more specific
behaviors, especially considering this would be done to save just a handful
of characters.

Andrea

On Fri, 15 Feb 2019 at 11:56, Mário Guimarães <
mario.luis.guimar...@gmail.com> wrote:

> Where is
>
> fn () -> M.fun("value")
>
> it should be
>
> fn () -> M.fun("value") end
>
> or
>
> fn -> M.fun("value") end
>
>
>
> quinta-feira, 14 de Fevereiro de 2019 às 16:46:18 UTC, Mário Guimarães
> escreveu:
>>
>> Hello,
>>
>> Elixir could support function captures without the need for any argument,
>> so that of instead of writing
>>
>> fn () -> M.fun("value")
>>
>> end one could write
>>
>>
>> &M.fun("value")
>>
>> Today the later returns an error like
>>
>> ** (CompileError) iex:28: invalid args for &, expected an expression in
>> the format of &Mod.fun/arity, &local/arity or a capture containing at
>> least one argument as &1, got: M.fun("value"))
>>
>> Thanks
>> Mário
>>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elixir-lang-core+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elixir-lang-core/a8c88a03-3a3a-4161-bbe4-52f24e1592e9%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-core/a8c88a03-3a3a-4161-bbe4-52f24e1592e9%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 

Andrea Leopardi
an.leopa...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAM9Rf%2BKJDRioz6hpw5-_ByvTNeTd8X-ecMFFXJyJrSsnzi4PXQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to