essence-of-live-coding-0.2.2: General purpose live coding framework
LiveCoding.Cell.Util
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.
foldC f b
foldC
a0
a1
b
f a0 b
f a1 $ f a0 b