@@ -548,7 +548,8 @@ slidingWindowWith n (Fold step1 initial1 extract1) = Fold step initial extract
548548 | i < n = do
549549 rh1 <- liftIO $ unsafeInsert rb rh a
550550 liftIO $ touchForeignPtr (ringStart rb)
551− r <- step1 st ((a, Nothing), toArray unsafeFoldRingM rb rh1)
551+ let action = toArray unsafeFoldRingM rb (PTR_NEXT(rh, a))
552+ r <- step1 st ((a, Nothing), action)
552553 return $
553554 case r of
554555 Partial s -> Partial $ Tuple4' rb rh1 (i + 1) s