on master help sign in
Update docs/streamly-vs-async.md.

- runStream -> S.drain

commit20b204c53e6b050c2b7ebed7b48b04aa2ac885ff authorPranay Sashank <pranaysashank@gmail.com> dateWed 24 Jul 2019, 13:53 (7 years ago) parentfe9b42e
1 file changed+4−4
docs/streamly-vs-async.md+4−4
docs/streamly-vs-async.md+4−4
@@ -36,7 +36,7 @@ generalization of the IO monad with non-deterministic composition of streams
3636added on top.
3737
3838However, if you would like to just run only some concurrent portions of your
39−program using streamly, you can do that too. Just use `runStream` if you want
39+program using streamly, you can do that too. Just use `drain` if you want
4040to run the stream without collecting the outputs of the concurrent actions or
4141use `toList` if you want to convert the output stream into a list. Other
4242stream folding operations can also be used, see the docs for more details.
@@ -84,10 +84,10 @@ return 2 first and then 1.
8484
8585### concurrently_
8686
87−Use `runStream` instead of `toList` to run the actions but ignore the results:
87+Use `drain` instead of `toList` to run the actions but ignore the results:
8888
8989```haskell
90− runStream $ parallely $ getURL 1 |: getURL 2 |: S.nil
90+ S.drain $ parallely $ getURL 1 |: getURL 2 |: S.nil
9191```
9292
9393### Concurrent Applicative
@@ -135,7 +135,7 @@ other actions will be canceled, for example:
135135 instance Exception Result
136136
137137 main = do
138− url <- try $ runStream $ parallely $
138+ url <- try $ S.drain $ parallely $
139139 (getURL 2 >>= throwM . Result)
140140 |: (getURL 1 >>= throwM . Result)
141141 |: S.nil