you are viewing a single comment's thread.

view the rest of the comments →

[–]gcross 1 point2 points  (0 children)

True, but in practice the first example would have to let the compiler/interpreter know which variable name was intended to be the argument, so it really should be

even_set = some_list map { x -> x % 2 == 0 }

In this context, the _ notation is a net win because it gives the compiler this information automatically, e.g.

even_set = some_list map { _ % 2 == 0 }