on master help sign in
Minor edits to docs
f0fa660Harendra Kumar
src/Streamly/Prelude.hs+1−1
@@ -20,9 +20,9 @@ module Streamly.Prelude
20 -- * Construction and Deconstruction
20 -- * Construction and Deconstruction
21 -- | Primitives to construct or inspect a stream.
21 -- | Primitives to construct or inspect a stream.
22 nil
22 nil
23− , once
24 , consM
23 , consM
25 , (|:)
24 , (|:)
25+ , once
26 , cons
26 , cons
27 , (.:)
27 , (.:)
28 , uncons
28 , uncons
src/Streamly/Streams.hs+4−3
@@ -154,7 +154,8 @@ type Streaming = IsStream
154nil :: IsStream t => t m a
154nil :: IsStream t => t m a
155nil = fromStream S.nil
155nil = fromStream S.nil
156
156
157−-- | Create a single element (singleton) stream from a monadic action.
157+-- | Create a singleton stream from a monadic action. Same as @m \`consM` nil@
158+-- but more efficient.
158--
159--
159-- @
160-- @
160-- > toList $ once getLine
161-- > toList $ once getLine
@@ -193,8 +194,8 @@ infixr 5 |:
193
194
194infixr 5 `cons`
195infixr 5 `cons`
195
196
196−-- | Same as @consM . return@. Constructs a stream by adding a pure value at
197+-- | Construct a stream by adding a pure value at the head of an existing
197−-- the head of an existing stream. For example:
198+-- stream. Same as @consM . return@. For example:
198--
199--
199-- @
200-- @
200-- > toList $ 1 \`cons` 2 \`cons` 3 \`cons` nil
201-- > toList $ 1 \`cons` 2 \`cons` 3 \`cons` nil