essence-of-live-coding-0.2.2: General purpose live coding framework

Safe HaskellSafe
LanguageHaskell2010

LiveCoding.Cell.Util

Synopsis

Documentation

sumFrom :: Monad m => Integer -> Cell m Integer Integer Source #

Sum all past inputs, starting by the given number

count :: Monad m => Cell m a Integer Source #

Count the number of ticks, starting at 0

foldC :: (Data b, Monad m) => (a -> b -> b) -> b -> Cell m a b Source #

Accumulate all incoming data, using the given fold function and start value. For example, if foldC f b receives inputs a0, a1,... it will output b, f a0 b, f a1 $ f a0 b, and so on.