@@ -259,7 +259,7 @@ module Streamly.Prelude.Internal
260 -- -- *** Chunks
260 -- -- *** Chunks
261 , chunksOf
261 , chunksOf
262− , sessionsOf
262+ , intervalsOf
264 -- -- *** Using Element Separators
264 -- -- *** Using Element Separators
265 , splitOn
265 , splitOn
@@ -2237,18 +2237,18 @@ chunksOf n f m = D.fromStreamD $ D.groupsOf n f (D.toStreamD m)
2238-- XXX we can implement this by repeatedly applying the 'lrunFor' fold.
2238-- XXX we can implement this by repeatedly applying the 'lrunFor' fold.
2239-- XXX add this example after fixing the serial stream rate control
2239-- XXX add this example after fixing the serial stream rate control
2240−-- >>> S.toList $ S.take 5 $ sessionsOf 1 FL.sum $ constRate 2 $ S.enumerateFrom 1
2240+-- >>> S.toList $ S.take 5 $ intervalsOf 1 FL.sum $ constRate 2 $ S.enumerateFrom 1
2241-- > [3,7,11,15,19]
2241-- > [3,7,11,15,19]
2243-- | Group the input stream into windows of @n@ second each and then fold each
2243-- | Group the input stream into windows of @n@ second each and then fold each
2244-- group using the provided fold function.
2244-- group using the provided fold function.
2246-- @since 0.7.0
2246-- @since 0.7.0
2247−{-# INLINE sessionsOf #-}
2247+{-# INLINE intervalsOf #-}
2248−sessionsOf
2248+intervalsOf
2249 :: (IsStream t, MonadAsync m)
2249 :: (IsStream t, MonadAsync m)
2250 => Double -> Fold m a b -> t m a -> t m b
2250 => Double -> Fold m a b -> t m a -> t m b
2251−sessionsOf n f xs =
2251+intervalsOf n f xs =
2252 splitBySuffix isNothing (FL.lcatMaybes f)
2252 splitBySuffix isNothing (FL.lcatMaybes f)
2253 (intersperseByTime n (return Nothing) (Serial.map Just xs))
2253 (intersperseByTime n (return Nothing) (Serial.map Just xs))