3 ms·
In Nemerle (another ML dialect for .NET), you can use _ to that end. Syntax for local functions/lambdas, all equivalent (but suited for different situations, s
by daeken 16y ago
In Nemerle (another ML dialect for .NET), you can use _ to that end. Syntax for local functions/lambdas, all equivalent (but suited for different situations, syntactically speaking):
def foo(x) { x + 5 }
fun(x) { x + 5}
(x) => x + 5
lambda x -> x + 5
_ + 5
I find I miss the _ syntax more than most syntactical sugar. I don't know how often I have to write things like lambda x: x.foo in Python, where _.foo would serve the same purpose.