Haskell Language Foldable

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

Foldable is the class of types t :: * -> * which admit a folding operation. A fold aggregates the elements of a structure in a well-defined order, using a combining function.

Remarks

If t is Foldable it means that for any value t a we know how to access all of the elements of a from "inside" of t a in a fixed linear order. This is the meaning of foldMap :: Monoid m => (a -> m) -> (t a -> m): we "visit" each element with a summary function and smash all the summaries together. Monoids respect order (but are invariant to different groupings).



Got any Haskell Language Question?