on develop help sign in
Fix doc for "switcher"
9f04ceeMatthew Justin Bauer
src/Reflex/Class.hs+2−2
@@ -363,8 +363,8 @@ instance Reflex t => Align (Event t) where
363gate :: Reflex t => Behavior t Bool -> Event t a -> Event t a
363gate :: Reflex t => Behavior t Bool -> Event t a -> Event t a
364gate = attachWithMaybe $ \allow a -> if allow then Just a else Nothing
364gate = attachWithMaybe $ \allow a -> if allow then Just a else Nothing
365
365
366−-- | Create a new behavior given a starting behavior and switch to a the
366+-- | Create a new behavior given a starting behavior and switch to the
367−-- behvior carried by the event when it fires.
367+-- behavior carried by the event when it fires.
368switcher :: (Reflex t, MonadHold t m)
368switcher :: (Reflex t, MonadHold t m)
369 => Behavior t a -> Event t (Behavior t a) -> m (Behavior t a)
369 => Behavior t a -> Event t (Behavior t a) -> m (Behavior t a)
370switcher b eb = pull . (sample <=< sample) <$> hold b eb
370switcher b eb = pull . (sample <=< sample) <$> hold b eb