Closed j-mie6 closed 11 months ago
These two combinators are analogies for the foldMap function, allowing for collapsing of Monoid and Semigroup structures:
foldMap
Monoid
Semigroup
manyMap :: Monoid m => (a -> m) -> Parsec a -> Parsec m someMap :: Semigroup s => (a -> s) -> Parsec a -> Parsec s
These can both be implemented in terms of manyr and somer
manyr
somer
These two combinators are analogies for the
foldMap
function, allowing for collapsing ofMonoid
andSemigroup
structures:These can both be implemented in terms of
manyr
andsomer