Introduction to Scala Part2 : Collections

Bubu
6,329 views

Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

Traversable: Folds

  • Operations: foldLeft, foldRight, /:, :, reduceLeft, reduceRight
  • Goal: apply a binary operation to successive elements.

Fold

return sum of a List
return the min value of a List
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content