@@ -120,20 +120,18 @@ initially. -}
120120dropIf : (a -> Bool) -> a -> Signal a -> Signal a
121121dropIf = Native.Signal.dropIf
122122
123−{-| Keep events only when the first signal is true. When the first signal
124−becomes true, the most recent value of the second signal will be propagated.
125−Until the first signal becomes false again, all events will be propagated. Elm
126−does not allow undefined signals, so a base case must be provided in case the
127−first signal is not true initially. -}
123+{-| Keep events only when the first signal is true. Elm does not allow undefined
124+signals, so a base case must be provided in case the first signal is not true
125+initially.
126+-}
128127keepWhen : Signal Bool -> a -> Signal a -> Signal a
129128keepWhen bs def sig =
130129 snd <~ (keepIf fst (False, def) ((,) <~ (sampleOn sig bs) ~ sig))
131130
132−{-| Drop events when the first signal is true. When the first signal becomes
133−false, the most recent value of the second signal will be propagated. Until the
134−first signal becomes true again, all events will be propagated. Elm does not
135−allow undefined signals, s oa base case must be provided in case the first
136−signal is true initially. -}
131+{-| Drop events when the first signal is true. Elm does not allow undefined
132+signals, so a base case must be provided in case the first signal is true
133+initially.
134+-}
137135dropWhen : Signal Bool -> a -> Signal a -> Signal a
138136dropWhen bs = keepWhen (not <~ bs)
139137