@@ -68,6 +68,7 @@ module Reflex.Class
6868 , switchHoldPromptOnly
6969 -- ** Using 'Event's to sample 'Behavior's
7070 , tag
71+ , tagMaybe
7172 , attach
7273 , attachWith
7374 , attachWithMaybe
@@ -557,6 +558,12 @@ instance Reflex t => Plus (Event t) where
557558tag :: Reflex t => Behavior t b -> Event t a -> Event t b
558559tag b = pushAlways $ \_ -> sample b
559560
561+-- | Replace each occurrence value of the 'Event' with the value of the
562+-- 'Behavior' at that time; if it is 'Just', fire with the contained value; if
563+-- it is 'Nothing', drop the occurrence.
564+tagMaybe :: Reflex t => Behavior t (Maybe b) -> Event t a -> Event t b
565+tagMaybe b = push $ \_ -> sample b
566+
560567-- | Create a new 'Event' that combines occurrences of supplied 'Event' with the
561568-- current value of the 'Behavior'.
562569attach :: Reflex t => Behavior t a -> Event t b -> Event t (a, b)