Foldable1 represents data structures with a minimum of one element that can be folded.
fold1folds a structure using a
foldMap1folds a structure by accumulating values in a
Default implementations are provided by the following functions:
Note: some combinations of the default implementations are unsafe to use together - causing a non-terminating mutually recursive cycle. These combinations are documented per function.
foldMap1 :: forall a m. Semigroup m => (a -> m) -> t a -> m
fold1 :: forall m. Semigroup m => t m -> m