- bind :: Monad m => (a -> m b) -> m a -> m b
- comb :: Applicative f => (b -> c -> d) -> (a -> f b) -> (a -> f c) -> a -> f d
- tup3 :: c -> (a, b) -> (a, b, c)
- apget :: (Functor m, MonadState s m) => (s -> a) -> m a
- options :: (Functor m, Monad m) => [(a -> m Bool, a -> m b)] -> a -> m (Maybe b)
- (<|>) :: ArrowChoice f => f a b -> f c d -> f (Either a c) (Either b d)
- ($$) :: (a -> a -> b) -> a -> b
- pairMap :: Arrow f => f a b -> f (a, a) (b, b)
Documentation
:: Applicative f | |
=> (b -> c -> d) | The operator. |
-> (a -> f b) | The first function. |
-> (a -> f c) | The second function. |
-> a -> f d | The resulting function. |
The resulting function of comb
is such that it applies two (possible) different functions
to a single element, and combine both results with the given operator, inside of an Applicative
container.
tup3 :: c -> (a, b) -> (a, b, c)Source
This function just adds a third component to a two-components tuple.
apget :: (Functor m, MonadState s m) => (s -> a) -> m aSource
Apply a function over the state, and return its result.
(<|>) :: ArrowChoice f => f a b -> f c d -> f (Either a c) (Either b d)Source
An ArrowChoice
operator.
Given an arrow a ~> b
and an arrow c ~> d
:
a ~> b <|> c ~> d = Either a c ~> Either b d { (a ~> b) lifted with Left for Left values. with -{ { (c ~> d) lifted with Right for Right values.