This demonstrates how to print each element of a Map
val map = Map(1 -> "a", 2 -> "b")
for (number <- map) println(number) // prints (1,a), (2,b)
for ((key, value) <- map) println(value) // prints a, b
This demonstrates how to print each element of a list
val l...