Replace foldLeft with reduceLeft.