You can use Data.Conduit.Lazy for this.<div><br></div><div><a href="https://www.stackage.org/haddock/lts-11.14/conduit-extra-1.3.0/Data-Conduit-Lazy.html">https://www.stackage.org/haddock/lts-11.14/conduit-extra-1.3.0/Data-Conduit-Lazy.html</a><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 21, 2018, 12:13 PM Jon Fairbairn <<a href="mailto:jon.fairbairn@cl.cam.ac.uk">jon.fairbairn@cl.cam.ac.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Suppose I’m writing some code using Conduits, but need to use<br>
some old function f::[a]->[b] (defined in a library somewhere)<br>
that transforms a lazy list.<br>
<br>
Is there a way of turning f into a Conduit without ending up<br>
with all of the list being in memory? ie something that looks<br>
like<br>
<br>
toConduit:: ([a]->[b]) -> ConduitT a b m ()<br>
<br>
I’ve got nowhere with Hoogle or Hayoo<br>
-- <br>
Jón Fairbairn <a href="mailto:Jon.Fairbairn@cl.cam.ac.uk" target="_blank">Jon.Fairbairn@cl.cam.ac.uk</a><br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div></div>