Foldable type class represents data structures that can be folded to a summary value.
The type of elements in the data structure
Pattern matches over the structure, applying specific handlers for each variant
Function to apply if the structure is empty or has no value
Function to apply if the structure has a value
The result of applying the appropriate function
Left-associative fold using the provided zero value and operation
Zero/identity value
A function that takes an operation to apply
Right-associative fold using the provided zero value and operation
Foldable type class represents data structures that can be folded to a summary value.