It would be good to be able to do something like this
List("hello").map(s"$_")
It would be good to be able to do something like this
List("hello").map(s"$_")
See scala/bug#7715 and the discussion at scala/scala#2793: this was actually implemented and rejected as being a bit too confusing. And maybe too easy to abuse.
However it was accepted in pattern matching, for the other use of _
, so there is that. Still, I’m a bit sad about this one. It’d be really neat for simple use cases…