on develop help sign in
Merge pull request #39 from snoyberg/develop
6924dadRyan Trinkle
src/Reflex/Dynamic.hs+5
@@ -93,6 +93,11 @@ instance HBuild' (a ': l) r
93-- | A container for a value that can change over time and allows notifications on changes.
93-- | A container for a value that can change over time and allows notifications on changes.
94-- Basically a combination of a 'Behavior' and an 'Event', with a rule that the Behavior will
94-- Basically a combination of a 'Behavior' and an 'Event', with a rule that the Behavior will
95-- change if and only if the Event fires.
95-- change if and only if the Event fires.
96+--
97+-- Although @Dynamic@ logically has a 'Functor' instance, currently it can\'t
98+-- be implemented without potentially requiring the mapped function to be
99+-- evaluated twice. Instead, you can use 'mapDyn', which runs in a 'MonadHold'
100+-- instance, to achieve the same result.
96data Dynamic t a
101data Dynamic t a
97 = Dynamic (Behavior t a) (Event t a)
102 = Dynamic (Behavior t a) (Event t a)
98
103