Slide 63
Slide 63 text
In the wild (Scala)
List(List(1,2), List(2), List(4,5)).map(_.sum)
res0: List(3, 2, 9)
List(2,3,4,5,6,7).foldLeft(0)(_+_)
res1: Int = 27
List("Hello", "I", "want", "to", "be", "a", "sentence").reduceLeft(_ + " " + _)
res2: String = Hello I want to be a sentence
Wednesday 2 October 13