Foldable1 represents data structures with a minimum of one element that can be folded.
foldr1folds a structure from the right
foldl1folds a structure from the left
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.
foldr1 :: forall a. (a -> a -> a) -> t a -> a
foldl1 :: forall a. (a -> a -> a) -> t a -> a
foldMap1 :: forall a m. Semigroup m => (a -> m) -> t a -> m