diff --git a/library/Potoki/Core/Produce.hs b/library/Potoki/Core/Produce.hs
--- a/library/Potoki/Core/Produce.hs
+++ b/library/Potoki/Core/Produce.hs
@@ -4,6 +4,7 @@
   list,
   transform,
   vector,
+  vectorWithIndices,
   hashMapRows,
   fileBytes,
   fileBytesAtOffset,
@@ -116,6 +117,19 @@
           indexVal <- readIORef indexRef
           writeIORef indexRef $! succ indexVal
           return $ (GenericVector.!?) vectorVal indexVal
+      in return fetch
+
+{-# INLINE vectorWithIndices #-}
+vectorWithIndices :: GenericVector.Vector vector a => vector a -> Produce (Int, a)
+vectorWithIndices vectorVal =
+  Produce $ liftIO $ do
+    indexRef <- newIORef 0
+    let
+      fetch =
+        A.Fetch $ do
+          indexVal <- readIORef indexRef
+          writeIORef indexRef $! succ indexVal
+          return $ fmap (indexVal,) $ (GenericVector.!?) vectorVal indexVal
       in return fetch
 
 {-# INLINE hashMapRows #-}
diff --git a/potoki-core.cabal b/potoki-core.cabal
--- a/potoki-core.cabal
+++ b/potoki-core.cabal
@@ -1,5 +1,5 @@
 name: potoki-core
-version: 2.2.15
+version: 2.2.16
 synopsis: Low-level components of "potoki"
 description:
   Provides everything required for building custom instances of
@@ -75,7 +75,7 @@
   build-depends:
     acquire >=0.2 && <0.3,
     attoparsec,
-    foldl >=1.3.7 && <1.4,
+    foldl >=1.3.7 && <2,
     ilist >=0.3.1.0 && <0.4,
     split >=0.2.3.3 && <0.3,
     potoki-core,
diff --git a/test/Transform.hs b/test/Transform.hs
--- a/test/Transform.hs
+++ b/test/Transform.hs
@@ -21,14 +21,14 @@
 transform =
   testGroup "Transform" $
   [
-    testProperty "Applying chunksOf to list has the same effect as the \"chunk\" transform" $ let
+    testProperty "Applying chunksOf to list has the same effect as the \"batch\" transform" $ let
       gen = do
         list <- listOf (choose (0, 1000 :: Int))
         chunkSize <- frequency [(1000, choose (1, 3)), (100, choose (4, 100)), (1, pure 0)]
         return (list, chunkSize)
       in forAll gen $ \ (list, chunkSize) -> let
         listChunks = if chunkSize < 1 then [] else SplitList.chunksOf chunkSize list
-        potokiChunks = unsafePerformIO $ C.produceAndTransformAndConsume (E.list list) (rmap toList (A.chunk chunkSize)) D.list
+        potokiChunks = unsafePerformIO $ C.produceAndTransformAndConsume (E.list list) (rmap toList (A.batch @Vector chunkSize)) D.list
         in listChunks === potokiChunks
     ,
     transformProduce
