[elixir-core:9703] nested captures via & are not allowed

2020-09-11 Thread ivan.y...@gmail.com
I just ran into this error "nested captures via & are not allowed" having no nested captures whatsoever,, but using captures in a chain of operations with custom operator, like this: `value ~> &op/1 ~> &op2/1` where ~> is basically an alias for some function, so when rewritten it looks like this

Re: [elixir-core:9705] nested captures via & are not allowed

2020-09-11 Thread ivan.y...@gmail.com
Ah, thanks, parentheses indeed fix that. On Friday, September 11, 2020 at 2:48:42 PM UTC+2 José Valim wrote: > The & has low precedence (low binding). Therefore, "value ~> &op/1 ~> > &op2/1" is being parsed as "value ~> &(op/1 ~> &op2/1)", which is where the > warning comes from. > > Proof: > >

[elixir-core:11873] Short form of lambdas for zero arguments and unused arguments proposal

2024-08-20 Thread ivan.y...@gmail.com
I realize it might be controversial, but I truly enjoy short form lambdas in any language I touch and Elixir is one of them. Yet I think there's a couple of use cases that are uncovered. One is when you need to encode a zero argument lambda returning a value and the second one is when there are