Merge pull request #206 from zsombornagy/master
A hopefully better foldp example
This commit is contained in:
commit
27ee179626
1 changed files with 2 additions and 1 deletions
|
@ -52,7 +52,8 @@ lift8 = Native.Signal.lift8
|
|||
-- Create a past-dependent signal. Each value given on the input signal will
|
||||
-- be accumulated, producing a new output value.
|
||||
--
|
||||
-- For instance, `(foldp (\\t acc -> acc + 1) 0 (Time.every second))` increments every second.
|
||||
-- For instance, `(foldp (\\arrows number -> number + arrows.y) 0 Keyboard.arrows)`
|
||||
-- increments or decrements the accumulated value (which starts at zero) when the up or down arrow keys are pressed.
|
||||
foldp : (a -> b -> b) -> b -> Signal a -> Signal b
|
||||
foldp = Native.Signal.foldp
|
||||
|
||||
|
|
Loading…
Reference in a new issue