• It's just a function parameter :)
    The _ is just the single input parameter. You can omit the parens, if there is only a single parameter. But you can think about it as wut = _unusedParameter => 42
    Btw boo = () => 42 is the same.

    To add more obscurity to it, you can do something like foo = _ => 42 without the curly braces.
    Which again is just the equivalent of function˙foo(){ return 42 } :) The 42 after the arrow is an implicit return, if your lambda doesn't have the curly braces { }

About

Avatar for Robin @Robin started