blog.adilakhter.com
Scala Notes: Fold
Fold is a general purpose operation on list (e.g., List[A]), which involves iterating (over each element) and applying a binary function– f: A -> B -> B to reduce the list to a single r…