Is there a syntax for annotating the types in a short-hand function such as _._3
?
You can do (_: (Int, String, Double))._3
. But it’s probably as much work and better readable if you just write the lambda in full when you need an explicit type annotation.
2 Likes
I don’t really understand the parentheses in Scala. Every time I think I do, I realize that I don’t really.
What is bothering you about them?