@@ -5,26 +5,37 @@
55[](https://ci.appveyor.com/project/harendra-kumar/streamly)
66[](https://coveralls.io/github/harendra-kumar/streamly?branch=master)
77
8−Streamly is a general streaming and concurrent programming
9−monad allowing you to write a wide variety of applications ranging from
10−simple applications utilizing streaming IO to massively parallel concurrent
11−applications as well as reactive (FRP) applications with the same ease.
12−Streamly provides high level concurrency primitives and hides the low level
13−concurrency details completely from the programmer. The programmer just
14−expresses whether a task can run in parallel with another. Threads,
15−synchronization and concurrency rate control are handled automatically. The
16−library has been written keeping high performance applications in mind.
17−
18−Streamly subsumes all the use cases of list transformer (list-t) and logic
19−programming (logict) monads and adds concurrency on top. It is a streaming
20−library and therefore can be used for most of the streaming use cases as well
21−(i.e. where you would use conduit or pipes) with concurrency added. It is
22−also a first class reactive programming library and can be used where you
23−would use libraries like Yampa or reflex. One way to think about it is to
24−think of it as composable state machines with concurrency. You can write from
25−really simple to complex applications, from streaming to FRP or massively
26−concurrent applications using the same simple and concise abstractions.
27−
8+## Stream`ing` `Concurrent`ly
9+Streamly unifies concurrency and streaming in a single monad transformer with a
10+concise and simple API. It provides two ways to combine streams, a monadic
11+product composition as well as the standard pipelined composition provided by
12+streaming libraries. A natural extension of regular monadic composition to
13+streaming and concurrency makes it intuitive and concise with almost unviversal
14+application. You can write concurrent or non-concurrent applications using
15+simple IO, logic programming, streaming IO or reactive programming (FRP) using
16+the same API. You can also think about it as representing concurrent and
17+composable state machines in imperative terms. It unifies the core
18+functionality provided by [async](https://hackage.haskell.org/package/async),
19+[logict](https://hackage.haskell.org/package/logict),
20+[list-t](https://hackage.haskell.org/package/list-t),
21+[conduit](https://hackage.haskell.org/package/conduit)\/[pipes](https://hackage.haskell.org/package/pipes),
22+[Yampa](https://hackage.haskell.org/package/Yampa)\/[reflex](https://hackage.haskell.org/package/reflex)
23+under one type and API. It interworks with the existing streaming libraries.
24+
25+## Magical Concurrency
26+Streamly provides high level concurrency primitives (higher level than async)
27+and hides the low level concurrency details completely from the programmer.
28+Concurrency can be used with ease in applicative or monadic contexts. The
29+programmer just expresses whether a task can run in parallel with another.
30+Threads, synchronization and concurrency rate control are handled
31+automatically under the hood. The concurrency facilities provided by streamly
32+can be compared with [OpenMP](https://en.wikipedia.org/wiki/OpenMP) and
33+[Cilk](https://en.wikipedia.org/wiki/Cilk) but with a more declarative
34+expression. Concurrency support does not compromise performance in
35+non-concurrent cases, the performance of the library is at par or better than
36+most of the existing streaming libraries.
37+
38+## Example
2839Here is a simple example to concurrently and recursively list the contents of a
2940directory tree:
3041