Safe Haskell | Safe-Inferred |
---|

Functions to make writing `Applicative`

and `Monad`

UGen graphs
less clumsy.

- (.+) :: (Functor f, Num a) => f a -> a -> f a
- (+.) :: (Functor f, Num a) => a -> f a -> f a
- (.+.) :: (Applicative m, Num a) => m a -> m a -> m a
- (.*) :: (Functor f, Num a) => f a -> a -> f a
- (*.) :: (Functor f, Num a) => a -> f a -> f a
- (.*.) :: (Applicative m, Num a) => m a -> m a -> m a
- composeM :: Monad m => [a -> m a] -> a -> m a
- chainM :: Monad m => Int -> (b -> m b) -> b -> m b

# Documentation

(.+.) :: (Applicative m, Num a) => m a -> m a -> m aSource

`+`

variant with `Applicative`

at left and right.

fmap (== 5) (return 3 .+. return 2)

(.*.) :: (Applicative m, Num a) => m a -> m a -> m aSource

`*`

variant with `Applicative`

at left and right.

fmap (== 6) (return 3 .*. return 2)