Scala fits pretty well with list manipulations. Indeed, it facilitates their usage by defining a lot of methods that enable a lot of behaviors, such as filtering elements or grouping them based on an aggregation value. There are tons of such methods, and actually, if we need something to do something with a sequence, it should already be defined at http://www.scala-lang.org/api/current/index.html#scala.collection.Seq.
In the coming sections, we'll cover the most useful sequences when building Scala templates. First of all, let me just point to the fact that in Scala, when we think
List we mean
foreach method provides a way to iterate over a sequence and apply a given function to each item. In ...