hsc3-0.16: Haskell SuperCollider

Sound.SC3.Common.Monad

Synopsis

repeatM :: Monad m => m t -> m [t] Source #

sequence of repeat

sequence

repeat

repeatM_ :: Monad m => m t -> m () Source #

void of repeatM.

void

repeatM

composeM :: Monad m => [a -> m a] -> a -> m a Source #

Right to left compositon of Monad functions.

Monad

fmap (== 7) (composeM [return . (+ 1),return . (/ 2)] 3) fmap (== 8) (composeM [return . (* 2),return . (+ 1)] 3)

chainM :: Monad m => Int -> (b -> m b) -> b -> m b Source #

Feed forward composition of n applications of f.

fmap (== 3) (chainM 3 (return . (+ 1)) 0)