Safe Haskell | Safe-Inferred |
---|
- newtype Artery m i o = Artery {}
- runArtery :: Monad m => Artery m i o -> i -> m (o, Artery m i o)
- effectful :: Monad m => (i -> m o) -> Artery m i o
- stateful :: Monad m => (i -> StateT s m o) -> s -> Artery m i o
- scan :: (i -> a -> a) -> a -> Artery m i a
- scanM :: Monad m => (i -> a -> m a) -> a -> Artery m i a
- fromList :: [a] -> Artery m b a
- runList :: Applicative m => Artery m a b -> [a] -> m [b]
- feedback :: r -> Artery m (i, r) (o, r) -> Artery m i o
- delay1 :: a -> Artery m a a
- delay :: Int -> a -> Artery m a a
- module Control.Arrow
Documentation
Artery
is a device that produces a value from the input every beat.
stateful :: Monad m => (i -> StateT s m o) -> s -> Artery m i oSource
Run the given stateful action every beat.
scanM :: Monad m => (i -> a -> m a) -> a -> Artery m i aSource
Analogous to scan
, but it allows monadic accumulators.
runList :: Applicative m => Artery m a b -> [a] -> m [b]Source
feedback :: r -> Artery m (i, r) (o, r) -> Artery m i oSource
Analogous to loop
, but the feedback will be delayed a beat.
delay1 :: a -> Artery m a aSource
Delay a beat. The first argument is the default value for the output.
module Control.Arrow