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

Language | Haskell2010 |

Miscellaneous combinators.

## Synopsis

- on2 :: (c -> d -> e) -> (a -> c) -> (b -> d) -> a -> b -> e
- matchingWithBoth :: Monad m => (a -> b -> m c) -> (c -> m r) -> a -> b -> m r
- matchingWith2 :: Monad m => (a -> m a') -> (b -> m b') -> ((a', b') -> m r) -> a -> b -> m r
- altf :: Alternative f => (a -> f b) -> (a -> f b) -> a -> f b
- altf2 :: Alternative f => (a -> b -> f c) -> (a -> b -> f c) -> a -> b -> f c
- (<$$>) :: Functor f => f a -> (a -> b) -> f b
- with :: a -> (a -> b) -> b
- (*..) :: (a -> c -> d) -> (b -> c) -> a -> b -> d
- (..*) :: (c -> d) -> (a -> b -> c) -> a -> b -> d

# Documentation

on2 :: (c -> d -> e) -> (a -> c) -> (b -> d) -> a -> b -> e Source #

Like `on`

, but apply a different function to each argument (which are
allowed to have different types).

matchingWithBoth :: Monad m => (a -> b -> m c) -> (c -> m r) -> a -> b -> m r Source #

`..*`

in the Kleisli category.

matchingWith2 :: Monad m => (a -> m a') -> (b -> m b') -> ((a', b') -> m r) -> a -> b -> m r Source #

`on2`

in the Kleisli category.

altf :: Alternative f => (a -> f b) -> (a -> f b) -> a -> f b Source #

Alternative `(`

over single-argument functions.`<|>`

)

altf2 :: Alternative f => (a -> b -> f c) -> (a -> b -> f c) -> a -> b -> f c Source #

Alternative `(`

over two-argument functions.`<|>`

)