Scala functional programming - Lists.