attrs.foreach( kv => ... ) // kv._1 is the key, kv._2 is the value
attrs.foreach{ case (k,v) => ... } // k is the key, v is the value
for ((k,v) <- attrs) { ... } // k is the key, v is the value
The trick is that iteration gives you key-value pairs, which you can't split up into a key and value identifier name without either using case or for.