on master help sign in
Minor doc edits
commitffa84b1f6703cbdd2c67152e68714992e67e6d21 authorHarendra Kumar <harendra.kumar@gmail.com> dateThu 26 Oct 2017, 08:37 (9 years ago) parent65fd734
1 file changed+8−8
src/Asyncly/Prelude.hs+8−8
src/Asyncly/Prelude.hs+8−8
@@ -69,17 +69,17 @@ import Asyncly.AsyncT
6969
7070-- $product
7171--
72−-- Different styles of streams dictate the manner in which a stream is
73−-- processed in monadic or applicative composition. Each style is represented
74−-- by a different type. The types have the same underlying representation and
72+-- Different styles of streams represented by different types dictate the
73+-- manner in which a stream is processed in monadic or applicative composition.
74+-- Each type differs in the processing order of the elements or processing
75+-- parallelism. The types have the same underlying representation and
7576-- therefore can be converted back and forth easily to switch the composition
76−-- style at any point. In other words, processing order of the elements or
77−-- processing parallelism is decided by the type of the stream.
77+-- style at any point.
7878--
7979-- 'StreamT' and 'InterleavedT' process the streams serially but differ in the
8080-- order in which the elements of the streams are processed. 'StreamT' goes
8181-- depth first that is it combine one element of the first stream to every
82−-- element of the second stream before it comes back to process th second
82+-- element of the second stream before it comes back to process the second
8383-- element of the first stream. 'InterleavedT' takes turns when processing
8484-- elements from each stream and therefore all iterations finish at the same
8585-- time rather than one iteration at a time as in the case of 'StreamT'.
@@ -88,8 +88,8 @@ import Asyncly.AsyncT
8888--
8989-- 'AsyncT' and 'ParallelT' can process the individual elements of the streams
9090-- in parallel. 'AsyncT' is the parallel version of 'StreamT', it follows the
91−-- order of 'StreamT' processing multiple elements of a stream concurrently.
92−-- 'ParallelT' follows the order of 'InterleavedT' processing and interleaving
91+-- order of 'StreamT', processing multiple elements of a stream concurrently.
92+-- 'ParallelT' follows the order of 'InterleavedT', processing and interleaving
9393-- both streams concurrently. Also, note that 'fmap' on these streams would
9494-- also work in a concurrent fashion i.e. multiple elements in a stream or
9595-- multiple streams can be mapped concurrently.