@@ -82,6 +82,13 @@ ffor = flip fmap
8282instance Reflex t => Functor (Behavior t) where
8383 fmap f = pull . liftM f . sample
8484
85+--TODO: Rewrite rules for Applicative
86+instance Reflex t => Applicative (Behavior t) where
87+ pure = constant
88+ f <*> x = pull $ sample f <*> sample x
89+ a *> b = b
90+ a <* b = a
91+
8592--TODO: See if there's a better class in the standard libraries already
8693-- | A class for values that combines filtering and mapping using 'Maybe'.
8794class FunctorMaybe f where