@@ -84,7 +84,7 @@ The following snippet provides a simple stream composition example that reads
84numbers from stdin, prints the squares of even numbers and exits if an even
84numbers from stdin, prints the squares of even numbers and exits if an even
85number more than 9 is entered.
85number more than 9 is entered.
87−```haskell
87+``` haskell
88import Streamly
88import Streamly
89import qualified Streamly.Prelude as S
89import qualified Streamly.Prelude as S
90import Data.Function ((&))
90import Data.Function ((&))
@@ -107,7 +107,7 @@ when used with appropriate stream type combinator (e.g. `asyncly`, `aheadly` or
108The following code finishes in 3 seconds (6 seconds when serial):
108The following code finishes in 3 seconds (6 seconds when serial):
111> let p n = threadDelay (n * 1000000) >> return n
111> let p n = threadDelay (n * 1000000) >> return n
112> S.toList $ aheadly $ p 3 |: p 2 |: p 1 |: S.nil
112> S.toList $ aheadly $ p 3 |: p 2 |: p 1 |: S.nil
@@ -118,7 +118,7 @@ The following code finishes in 3 seconds (6 seconds when serial):
119The following finishes in 10 seconds (100 seconds when serial):
119The following finishes in 10 seconds (100 seconds when serial):
122runStream $ asyncly $ S.replicateM 10 $ p 10
122runStream $ asyncly $ S.replicateM 10 $ p 10
@@ -129,7 +129,7 @@ following example prints a "hello" every second; if you use `&` instead of
129`|&` you will see that the delay doubles to 2 seconds instead because of serial
129`|&` you will see that the delay doubles to 2 seconds instead because of serial
130application.
130application.
133main = runStream $
133main = runStream $
134 S.repeatM (threadDelay 1000000 >> return "hello")
134 S.repeatM (threadDelay 1000000 >> return "hello")
135 |& S.mapM (\x -> threadDelay 1000000 >> putStrLn x)
135 |& S.mapM (\x -> threadDelay 1000000 >> putStrLn x)
@@ -139,7 +139,7 @@ main = runStream $
140We can use `mapM` or `sequence` functions concurrently on a stream.
140We can use `mapM` or `sequence` functions concurrently on a stream.
143> let p n = threadDelay (n * 1000000) >> return n
143> let p n = threadDelay (n * 1000000) >> return n
144> runStream $ aheadly $ S.mapM (\x -> p 1 >> print x) (serially $ repeatM (p 1))
144> runStream $ aheadly $ S.mapM (\x -> p 1 >> print x) (serially $ repeatM (p 1))
@@ -176,7 +176,7 @@ delay n = S.yieldM $ do
177### Serial
177### Serial
179−```haskell
179+``` haskell
180main = runStream $ delay 3 <> delay 2 <> delay 1
180main = runStream $ delay 3 <> delay 2 <> delay 1
@@ -187,7 +187,7 @@ ThreadId 36: Delay 1
188### Parallel
188### Parallel
190−```haskell
190+``` haskell
191main = runStream . parallely $ delay 3 <> delay 2 <> delay 1
191main = runStream . parallely $ delay 3 <> delay 2 <> delay 1