Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

- mmany :: (Alternative a, Monoid m) => a m -> a m
- msome :: (Alternative a, Monoid m) => a m -> a m
- manyWith :: (Alternative a, Monoid m) => (v -> m) -> (m -> v) -> a v -> a v
- someWith :: (Alternative a, Monoid m) => (v -> m) -> (m -> v) -> a v -> a v

# Documentation

mmany :: (Alternative a, Monoid m) => a m -> a m Source #

Many generalization for Monoid instances.

Issue #2

msome :: (Alternative a, Monoid m) => a m -> a m Source #

Some generatlization for Monoid instances.

Issue #2

manyWith :: (Alternative a, Monoid m) => (v -> m) -> (m -> v) -> a v -> a v Source #

Utility for casting bare values into a Monoid in mmany.

For example, the function:

let sumMany = manyWith Sum getSum

will sum the results of many.

Issue #2

someWith :: (Alternative a, Monoid m) => (v -> m) -> (m -> v) -> a v -> a v Source #

Utility for casting bare values into a Monoid in msome.

For example, the function:

let sumSome = someWith Sum getSum

will sum the results of some.

Issue #2