Module foldable

Module foldable 

Source
Expand description

Foldable type class.

This module defines the Foldable trait, which represents data structures that can be folded to a single value.

Traits§

Foldable
A type class for structures that can be folded to a single value.

Functions§

fold_left
Folds the structure by applying a function from left to right.
fold_map
Maps values to a monoid and combines them.
fold_right
Folds the structure by applying a function from right to left.