@@ -374,8 +374,12 @@ timeout = undefined
374-- From Generator functions
374-- From Generator functions
375------------------------------------------------------------------------------
375------------------------------------------------------------------------------
377+-- XXX we can remove it and recommend the definition in terms of enumerate and
378+-- map. Check performance equivalence.
382+-- fromIndices f = fmap f $ Stream.enumerateFrom 0
379-- fromIndices f = let g i = f i \`cons` g (i + 1) in g 0
383-- fromIndices f = let g i = f i \`cons` g (i + 1) in g 0
@@ -383,7 +387,7 @@ timeout = undefined
383-- applied on the corresponding index. Index starts at 0.
387-- applied on the corresponding index. Index starts at 0.
386−-- > S.toList $ S.take 5 $ S.fromIndices id
390+-- > Stream.toList $ Stream.take 5 $ Stream.fromIndices id
387-- [0,1,2,3,4]
391-- [0,1,2,3,4]
@@ -395,6 +399,7 @@ fromIndices = fromStreamS . S.fromIndices
402+-- fromIndicesM f = Stream.mapM f $ Stream.enumerateFrom 0
398-- fromIndicesM f = let g i = f i \`consM` g (i + 1) in g 0
403-- fromIndicesM f = let g i = f i \`consM` g (i + 1) in g 0