@@ -85,6 +85,14 @@ sourceFromList n = S.fromList [n..n+value]
8585sourceFromListM :: (S.MonadAsync m, S.IsStream t) => Int -> t m Int
8686sourceFromListM n = S.fromListM (Prelude.fmap return [n..n+value])
8787
88+{-# INLINE sourceFromIndices #-}
89+sourceFromIndices :: (Monad m, S.IsStream t) => Int -> t m Int
90+sourceFromIndices n = S.take value $ S.fromIndices (+ n)
91+
92+{-# INLINE sourceFromIndicesM #-}
93+sourceFromIndicesM :: (S.MonadAsync m, S.IsStream t) => Int -> t m Int
94+sourceFromIndicesM n = S.take value $ S.fromIndicesM (Prelude.fmap return (+ n))
95+
8896{-# INLINE sourceFromFoldable #-}
8997sourceFromFoldable :: S.IsStream t => Int -> t m Int
9098sourceFromFoldable n = S.fromFoldable [n..n+value]