The &quot;pipes&quot; library for Haskell has a more comprehensive take. Having this kind of streaming built in really makes shell a fantastically productive language. Declarative composition of &quot;concurrent streams&quot; or &quot;coroutines&quot; is an extremely versatile pattern. Especially when you add named channels (&quot;named pipes&quot;, &quot;FIFOs&quot;) so you can create arbitrary networks.<p><a href="https:&#x2F;&#x2F;hackage.haskell.org&#x2F;package&#x2F;pipes-4.1.6&#x2F;docs&#x2F;Pipes-Tutorial.html" rel="nofollow">https:&#x2F;&#x2F;hackage.haskell.org&#x2F;package&#x2F;pipes-4.1.6&#x2F;docs&#x2F;Pipes-T...</a>