by ponzao · 12y ago · 0 comments
list filter isEven foreach println
As a side note omitting that many commas and parenthesis is very rare at least based on the Scala projects I've worked on. The above example is equal to the one below: list.filter(isEven).foreach(println)If you wanted to be really explicit you could do:
list.filter(x=> isEven(x)).foreach(x=> println(x))
yuck ;-)