Fold takes data in one format and gives it back to you in another.
val list = List(1, 2, 3, 4, 5)
val sum = list.fold(0)((x, y) => x + y)
foldLeft()
iterates from left to rightfoldRight()
iterates from right to leftfold()
does not go in any particular order
start value must be a supertype of the object you are folding.
e.g. Int is a supertype of List[Int]
start value must be neutral(not affect the result)