Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
LiveCoding.Cell.Util
Contents
Documentation
sumFrom :: Monad m => Integer -> Cell m Integer Integer Source #
Sum all past inputs, starting by the given number
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
receives inputs foldC
f ba0
, a1
,...
it will output b
, f a0 b
, f a1 $ f a0 b
, and so on.