on master help sign in
corrected documentation of keepIf and friends
b79a8a8jvoigtlaender
libraries/Signal.elm+6−6
@@ -106,13 +106,13 @@ countIf = Native.Signal.countIf
106
106
107{-| Keep only events that satisfy the given predicate. Elm does not allow
107{-| Keep only events that satisfy the given predicate. Elm does not allow
108undefined signals, so a base case must be provided in case the predicate is
108undefined signals, so a base case must be provided in case the predicate is
109−never satisfied. -}
109+not satisfied initially. -}
110keepIf : (a -> Bool) -> a -> Signal a -> Signal a
110keepIf : (a -> Bool) -> a -> Signal a -> Signal a
111keepIf = Native.Signal.keepIf
111keepIf = Native.Signal.keepIf
112
112
113{-| Drop events that satisfy the given predicate. Elm does not allow undefined
113{-| Drop events that satisfy the given predicate. Elm does not allow undefined
114−signals, so a base case must be provided in case the predicate is never
114+signals, so a base case must be provided in case the predicate is satisfied
115−satisfied. -}
115+initially. -}
116dropIf : (a -> Bool) -> a -> Signal a -> Signal a
116dropIf : (a -> Bool) -> a -> Signal a -> Signal a
117dropIf = Native.Signal.dropIf
117dropIf = Native.Signal.dropIf
118
118
@@ -120,15 +120,15 @@ dropIf = Native.Signal.dropIf
120becomes true, the most recent value of the second signal will be propagated.
120becomes true, the most recent value of the second signal will be propagated.
121Until the first signal becomes false again, all events will be propagated. Elm
121Until the first signal becomes false again, all events will be propagated. Elm
122does not allow undefined signals, so a base case must be provided in case the
122does not allow undefined signals, so a base case must be provided in case the
123−first signal is never true. -}
123+first signal is not true initially. -}
124keepWhen : Signal Bool -> a -> Signal a -> Signal a
124keepWhen : Signal Bool -> a -> Signal a -> Signal a
125keepWhen = Native.Signal.keepWhen
125keepWhen = Native.Signal.keepWhen
126
126
127{-| Drop events when the first signal is true. When the first signal becomes
127{-| Drop events when the first signal is true. When the first signal becomes
128false, the most recent value of the second signal will be propagated. Until the
128false, the most recent value of the second signal will be propagated. Until the
129first signal becomes true again, all events will be propagated. Elm does not
129first signal becomes true again, all events will be propagated. Elm does not
130−allow undefined signals, so a base case must be provided in case the first
130+allow undefined signals, s oa base case must be provided in case the first
131−signal is always true. -}
131+signal is true initially. -}
132dropWhen : Signal Bool -> a -> Signal a -> Signal a
132dropWhen : Signal Bool -> a -> Signal a -> Signal a
133dropWhen = Native.Signal.dropWhen
133dropWhen = Native.Signal.dropWhen
134
134