| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | Haskell2010 | 
Control.Artery
- 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
 - cartridge :: MonadIO m => MVar (Artery m i o) -> Artery m i o
 - module Control.Arrow
 
Documentation
Artery is a device that produces a value from the input every beat.
Instances
| Category * (Artery m) | |
| Arrow (Artery m) | |
| ArrowChoice (Artery m) | |
| Strong (Artery m) | |
| Choice (Artery m) | |
| Profunctor (Artery m) | |
| Functor (Artery m i) | |
| Applicative (Artery m i) | |
| Fractional o => Fractional (Artery m i o) | |
| Num o => Num (Artery m i o) | |
| Monoid o => Monoid (Artery m i o) | 
stateful :: Monad m => (i -> StateT s m o) -> s -> Artery m i o Source
Run the given stateful action every beat.
scanM :: Monad m => (i -> a -> m a) -> a -> Artery m i a Source
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 o Source
Analogous to loop, but the feedback will be delayed a beat.
delay1 :: a -> Artery m a a Source
Delay a beat. The first argument is the default value for the output.
module Control.Arrow