@@ -380,7 +380,7 @@ notElem e m = go (toStream m)
380length :: (Streaming t, Monad m) => t m a -> m Int
380length :: (Streaming t, Monad m) => t m a -> m Int
381length = foldl (\n _ -> n + 1) 0 id
381length = foldl (\n _ -> n + 1) 0 id
383−-- | Returns the elements of the stream in reverse order.
383+-- | Returns the elements of the stream in reverse order.
384-- The stream must be finite.
384-- The stream must be finite.
385reverse :: (Streaming t) => t m a -> t m a
385reverse :: (Streaming t) => t m a -> t m a
386reverse m = fromStream $ go Nothing (toStream m)
386reverse m = fromStream $ go Nothing (toStream m)
@@ -463,6 +463,7 @@ sequence m = fromStream $ go (toStream m)
463 yield a (Just x) = a >>= \b -> yld b (Just (go x))
463 yield a (Just x) = a >>= \b -> yld b (Just (go x))
464 in (runStream m1) Nothing stop yield
464 in (runStream m1) Nothing stop yield
466+-- | Generate a stream by performing an action @n@ times.
466replicateM :: (Streaming t, Monad m) => Int -> m a -> t m a
467replicateM :: (Streaming t, Monad m) => Int -> m a -> t m a
467replicateM n m = fromStream $ go n
468replicateM n m = fromStream $ go n