From fa28e6119848e5eff3562652e0c2edfcec04ce42 Mon Sep 17 00:00:00 2001 From: Zsombor Nagy Date: Thu, 8 Aug 2013 08:24:24 +0200 Subject: [PATCH] Change foldp example to contain a function which uses both of its arguments --- libraries/Signal.elm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/Signal.elm b/libraries/Signal.elm index 7fddef3..16f3b31 100644 --- a/libraries/Signal.elm +++ b/libraries/Signal.elm @@ -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