foldMap : Foldable t => Monoid m => (a -> m) -> t a -> m
Map each element to a monoid and combine, left-to-right.
import Data.FoldableFoldablefoldMap : Foldable t => Monoid m => (a -> m) -> t a -> mfold : Foldable t => Monoid m => t m -> mtoList : Foldable t => t a -> List anull : Foldable t => t a -> Boolcount : Foldable t => t a -> Natsum : Foldable t => Additive a => t a -> aproduct : Foldable t => Multiplicative a => t a -> aelem : Foldable t => Eq a => a -> t a -> Boolany : Foldable t => (a -> Bool) -> t a -> Boolall : Foldable t => (a -> Bool) -> t a -> Boolmaximum : Foldable t => Ord a => t a -> Maybe aminimum : Foldable t => Ord a => t a -> Maybe afoldMap : Foldable t => Monoid m => (a -> m) -> t a -> m
Map each element to a monoid and combine, left-to-right.
fold : Foldable t => Monoid m => t m -> m
Combine the elements of a foldable of monoids (fold = foldMap id).
toList : Foldable t => t a -> List a
All the elements as a list, left-to-right.
null : Foldable t => t a -> Bool
Is the foldable empty?
count : Foldable t => t a -> Nat
The number of elements.
sum : Foldable t => Additive a => t a -> a
Sum of the elements (0 for the empty foldable).
product : Foldable t => Multiplicative a => t a -> a
Product of the elements (1 for the empty foldable).
elem : Foldable t => Eq a => a -> t a -> Bool
Is a value an element? Stops at the first element equal to it.
any : Foldable t => (a -> Bool) -> t a -> Bool
Does any element satisfy the predicate? Stops at the first that does.
all : Foldable t => (a -> Bool) -> t a -> Bool
Do all elements satisfy the predicate? Stops at the first that does not.
maximum : Foldable t => Ord a => t a -> Maybe a
Largest element, or Nothing if empty (total).
minimum : Foldable t => Ord a => t a -> Maybe a
Smallest element, or Nothing if empty (total).