on master help sign in
Make minor changes to docs and update changelog
commit2e7c62810fd336fc7f412b5b4694221dcdf1ff3e authorHarendra Kumar <harendra.kumar@gmail.com> dateSun 18 Mar 2018, 12:48 (9 years ago) parent0d3c3a0
3 files changed+4−2
Changelog.md+1 src/Streamly/Prelude.hs+2−1 src/Streamly/Streams.hs+1−1
Changelog.md+1
@@ -1,6 +1,7 @@
11## Unreleased
22
33### Enhancements
4+* Make `cons` right associative and provide an operator form `.:` for it
45* Add `null`, `tail`, `reverse`, `replicateM`, `scan` stream operations
56* Improve performance of some stream operations (`foldl`, `dropWhile`)
67
src/Streamly/Prelude.hs+2−1
@@ -380,7 +380,7 @@ notElem e m = go (toStream m)
380380length :: (Streaming t, Monad m) => t m a -> m Int
381381length = foldl (\n _ -> n + 1) 0 id
382382
383−-- | Returns the elements of the stream in reverse order.
383+-- | Returns the elements of the stream in reverse order.
384384-- The stream must be finite.
385385reverse :: (Streaming t) => t m a -> t m a
386386reverse m = fromStream $ go Nothing (toStream m)
@@ -463,6 +463,7 @@ sequence m = fromStream $ go (toStream m)
463463 yield a (Just x) = a >>= \b -> yld b (Just (go x))
464464 in (runStream m1) Nothing stop yield
465465
466+-- | Generate a stream by performing an action @n@ times.
466467replicateM :: (Streaming t, Monad m) => Int -> m a -> t m a
467468replicateM n m = fromStream $ go n
468469 where
src/Streamly/Streams.hs+1−1
@@ -112,7 +112,7 @@ class Streaming t where
112112-- Constructing a stream
113113------------------------------------------------------------------------------
114114
115−-- | Represesnts an empty stream just like @[]@ represents and empty list.
115+-- | Represesnts an empty stream just like @[]@ represents an empty list.
116116nil :: Streaming t => t m a
117117nil = fromStream snil
118118