So say i have some list like
val l = List((1, \"blue\"), (5, \"red\"), (2, \"green\"))
And then i want to filter one of them out, i can do some
This is about the closest you can get:
val m = l.filter { case (n, s) => n != 2 }
It's basically pattern matching syntax inside an anonymous PartialFunction. There are also the tupled methods in Function object and traits, but they are just a wrapper around this pattern matching expression.
tupled
Function