@@ -82,6 +82,13 @@ ffor = flip fmap
82instance Reflex t => Functor (Behavior t) where
82instance Reflex t => Functor (Behavior t) where
83 fmap f = pull . liftM f . sample
83 fmap f = pull . liftM f . sample
85+--TODO: Rewrite rules for Applicative
86+instance Reflex t => Applicative (Behavior t) where
88+ f <*> x = pull $ sample f <*> sample x
85--TODO: See if there's a better class in the standard libraries already
92--TODO: See if there's a better class in the standard libraries already
86-- | A class for values that combines filtering and mapping using 'Maybe'.
93-- | A class for values that combines filtering and mapping using 'Maybe'.
87class FunctorMaybe f where
94class FunctorMaybe f where