on master help sign in
improve docs, add operator mnemonics
commit082a4fcfbbdd712e76bcea616ea9a056d344118f authorHarendra Kumar <harendra.kumar@gmail.com> dateMon 28 May 2018, 12:16 (8 years ago) parent2f706b9
2 files changed+10−8
src/Streamly.hs+6−5 src/Streamly/Streams.hs+4−3
src/Streamly.hs+6−5
@@ -180,11 +180,12 @@ import Data.Semigroup (Semigroup(..))
180180
181181-- $application
182182--
183−-- Several stream processing functions can be called in a chain using regular
184−-- function application, using the '$' operator or reverse function application
185−-- operator '&'. This section provides corresponding operators that can apply
186−-- stream processing functions such that ach stage of the stream can run in
187−-- parallel.
183+-- Stream processing functions can be composed in a chain using function
184+-- application with or without the '$' operator, or with reverse function
185+-- application operator '&'. Streamly provides concurrent versions of these
186+-- operators applying stream processing functions such that each stage of the
187+-- stream can run in parallel. The operators start with a @|@; we can read '|$'
188+-- as "@parallel dollar@" to remember that @|@ comes before '$'.
188189--
189190-- Imports for the code snippets below:
190191--
src/Streamly/Streams.hs+4−3
@@ -134,8 +134,8 @@ infixr 5 |:
134134class IsStream t where
135135 toStream :: t m a -> S.Stream m a
136136 fromStream :: S.Stream m a -> t m a
137− -- | Constructs a stream by adding a monadic action at the head of an existing
138− -- stream. For example:
137+ -- | Constructs a stream by adding a monadic action at the head of an
138+ -- existing stream. For example:
139139 --
140140 -- @
141141 -- > toList $ getLine \`consM` getLine \`consM` nil
@@ -148,7 +148,8 @@ class IsStream t where
148148 --
149149 -- @since 0.2.0
150150 consM :: MonadAsync m => m a -> t m a -> t m a
151− -- | Operator equivalent of 'consM'.
151+ -- | Operator equivalent of 'consM'. We can read it as "@parallel colon@"
152+ -- to remember that @|@ comes before ':'.
152153 --
153154 -- @
154155 -- > toList $ getLine |: getLine |: nil