[nem-en] Partial application and functional types

Vladimir Reshetnikov v.reshetnikov at gmail.com
Wed Feb 14 19:58:30 CET 2007


On 2/14/07, Ivan A Eryshov <ivan.eryshov at gmail.com> wrote:
>
> > On Behalf Of Vladimir Reshetnikov
> >
> > Not more ugly, than _.foo(), which is allowed.
> > Surely, I could write f => f(2), but I want to save my fingers.
>
> Then we will write: def x = _._(_); and chaos will come ;)

Obviously, _._(_) would be an equivalent of _._.apply(_), which is not
valid partial application expression.

Consider also

[nemerle]
using Nemerle.Builtins.Function;

def x = 2 |> _;
def y = a => a + 1;
_ = x(y)
[/nemerle]

which is currently valid syntax.
For me, _(2) is even more clearly.



More information about the devel-en mailing list