@@ -17,7 +17,7 @@
17-- demand by the consumer. However, combinators are provided to fine tune the
17-- demand by the consumer. However, combinators are provided to fine tune the
18-- concurrency control.
18-- concurrency control.
19-- Streaming and concurrency together enable expressing reactive applications
19-- Streaming and concurrency together enable expressing reactive applications
20−-- conveniently. See 'Streamly.Examples' for a simple SDL based FRP example.
20+-- conveniently. See "Streamly.Examples" for a simple SDL based FRP example.
22-- Streamly streams are very much like the Haskell lists and most of the
22-- Streamly streams are very much like the Haskell lists and most of the
23-- functions that work on lists have a counterpart that works on streams.
23-- functions that work on lists have a counterpart that works on streams.
@@ -25,9 +25,9 @@
25-- concurrently. In this tutorial we will go over the basic concepts and how to
25-- concurrently. In this tutorial we will go over the basic concepts and how to
26-- use the library. The documentation of @Streamly@ module has more details on
26-- use the library. The documentation of @Streamly@ module has more details on
27-- core APIs. For more APIs for constructing, folding, filtering, mapping and
27-- core APIs. For more APIs for constructing, folding, filtering, mapping and
28−-- zipping etc. see the documentation of @Streamly.Prelude@ module. For
28+-- zipping etc. see the documentation of "Streamly.Prelude" module. For
29-- examples and other ways to use the library see the module
29-- examples and other ways to use the library see the module
30−-- @Streamly.Examples@ as well.
30+-- "Streamly.Examples" as well.
32module Streamly.Tutorial
32module Streamly.Tutorial
@@ -125,7 +125,6 @@ where
126import Streamly
126import Streamly
127import Streamly.Prelude
127import Streamly.Prelude
128−-- import Streamly.Examples
129import Data.Semigroup
128import Data.Semigroup
130import Control.Applicative
129import Control.Applicative
131import Control.Monad
130import Control.Monad
@@ -161,7 +160,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
163-- For more ways to construct or generate a stream see the module
162-- For more ways to construct or generate a stream see the module
164−-- @Streamly.Prelude@.
163+-- "Streamly.Prelude".
166-- $eliminating
165-- $eliminating
@@ -191,7 +190,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
193-- For other ways to eliminate or fold a stream see the module
192-- For other ways to eliminate or fold a stream see the module
194−-- @Streamly.Prelude@.
193+-- "Streamly.Prelude".
196-- $semigroup
195-- $semigroup
197-- Streams of the same type can be combined into a composite stream in many
196-- Streams of the same type can be combined into a composite stream in many
@@ -349,7 +348,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
349-- time. Take an example of a merge sort of two sorted streams. We need to
348-- time. Take an example of a merge sort of two sorted streams. We need to
350-- keep consuming items from the stream which has the lowest item in the sort
349-- keep consuming items from the stream which has the lowest item in the sort
351-- order. This can be achieved using async references to streams. See
350-- order. This can be achieved using async references to streams. See
352−-- 'Streamly.Examples.MergeSortedStreams'.
351+-- "Streamly.Examples.MergeSortedStreams".
354-- $monoid
353-- $monoid
@@ -364,7 +363,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
364-- * 'foldMapWith' folds like foldWith but also maps a function before folding.
363-- * 'foldMapWith' folds like foldWith but also maps a function before folding.
365-- * 'forEachWith' is like foldMapwith but the container argument comes before
364-- * 'forEachWith' is like foldMapwith but the container argument comes before
366-- the function argument.
365-- the function argument.
367−-- * The 'each' primitive from @Streamly.Prelude@ folds a 'Foldable' container
366+-- * The 'each' primitive from "Streamly.Prelude" folds a 'Foldable' container
368-- using the '<>' operator:
367-- using the '<>' operator:
370-- All of the following are equivalent:
369-- All of the following are equivalent:
@@ -600,7 +599,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
602-- Also see the 'mapM' and 'sequence' functions for mapping actions, in the
601-- Also see the 'mapM' and 'sequence' functions for mapping actions, in the
603−-- @Streamly.Prelude@ module.
602+-- "Streamly.Prelude" module.
605-- $applicative
604-- $applicative
@@ -703,11 +702,10 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
703-- $zipping
702-- $zipping
705-- Zipping is a special transformation where the corresponding elements of two
704-- Zipping is a special transformation where the corresponding elements of two
706−-- streams are combined together using a zip function producing a new
705+-- streams are combined together using a zip function producing a new stream of
707−-- stream of outputs. Two different types are provided for serial and
706+-- outputs. Two different types are provided for serial and concurrent zipping.
708−-- concurrent zipping. These types provide an applicative instance that zips
707+-- These types provide an applicative instance that zips the argument streams.
709−-- the argument streams. Also see the zipping function in the @Streamly.Prelude@
708+-- Also see the zipping function in the "Streamly.Prelude" module.
712-- $serialzip
710-- $serialzip