class Bifoldable p where
Bifoldable represents data structures with two type arguments which can be
A fold for such a structure requires two step functions, one for each type argument. Type class instances should choose the appropriate step function based on the type of the element encountered at each point of the fold.
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.
bifoldr :: forall c b a. (a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
bifoldl :: forall c b a. (c -> a -> c) -> (c -> b -> c) -> c -> p a b -> c
bifoldMap :: forall b a m. Monoid m => (a -> m) -> (b -> m) -> p a b -> m