@@ -301,6 +301,8 @@ instance Semigroup b => Monoid (ThrottleBuffer b) where
301-- If the output event has not occurred recently, occurrences of the input event will cause the output event to fire immediately.
301-- If the output event has not occurred recently, occurrences of the input event will cause the output event to fire immediately.
302-- The first parameter is a function that receives access to the output event, and should construct an event that fires when the receiver is
302-- The first parameter is a function that receives access to the output event, and should construct an event that fires when the receiver is
303-- ready for more input. For example, using @delay 20@ would give a simple time-based throttle.
303-- ready for more input. For example, using @delay 20@ would give a simple time-based throttle.
305+-- NB: The provided lag function must *actually* delay the event.
304throttleBatchWithLag :: (MonadFix m, MonadHold t m, PerformEvent t m, Semigroup a) => (Event t () -> m (Event t ())) -> Event t a -> m (Event t a)
306throttleBatchWithLag :: (MonadFix m, MonadHold t m, PerformEvent t m, Semigroup a) => (Event t () -> m (Event t ())) -> Event t a -> m (Event t a)
305-- Invariants:
307-- Invariants:
306-- * Immediate mode must turn off whenever output is produced.
308-- * Immediate mode must turn off whenever output is produced.