@@ -326,6 +326,14 @@ demuxGeneric getKey getFold = fmap extract $ foldlM' step initial
326-- This can be used to scan a stream and collect the results from the scan
326-- This can be used to scan a stream and collect the results from the scan
327-- output.
327-- output.
329+-- Since the fold generator function is monadic we can add folds dynamically.
330+-- For example, we can maintain a Map of keys to folds in an IORef and lookup
331+-- the fold from that corresponding to a key. This Map can be changed
332+-- dynamically, folds for new keys can be added or folds for old keys can be
333+-- deleted or modified.
335+-- Compare with 'classify', the fold in 'classify' is a static fold.
329-- /Pre-release/
337-- /Pre-release/
331{-# INLINE demux #-}
339{-# INLINE demux #-}