| Start |
|---|
| An instance of Foldable for a binary tree To instantiate This implementation performs an in-order traversal (opens new window) of the tree. The |
Definition of Foldable Intuitively (though not technically), |
| Counting the elements of a Foldable structure
Note that this return type |
| Folding a structure in reverse Any fold can be run in the opposite direction with the help of the When the underlying monoid of a We can use this machinery to write a terse |
| Flattening a Foldable structure into a list
|
| Performing a side-effect for each element of a Foldable structure
Moreover, when the |
| Flattening a Foldable structure into a Monoid
Example usage with the |
| Checking if a Foldable structure is empty
RemarksIf |
Read Article
https://develop.horje.com/learn/1434/reference