title: Lazily evaluated recursive stream in fp-ts from paginated API
body: <p>My goal is to request transactions from an API and store them to a database. The response is paginated and I want to read every page and store the transactions in batches.</p>
  
  <p>So for one request/response cycle I wish to then process the result and store it to the database before fetching the next batch.</p>
  
  <p>How do I do this in an idiomatic way in fp-ts? I inject the actual HTTP fetch call as <code>(url:string, init:RequestInit) =&gt; TE.TaskEither&lt;Error, Response&gt;</code> in order to keep it testable.</p>
  
  <p>So far I've tested RxJS and fp-ts and that got a bit complicated even if I got it to work. </p>
  
  <p>Did give both recursive function and generators a try but I'm not succeeding in getting it to be lazily evaluated.</p>
  
  <p>Are there any existing examples with fp-ts that shows a lazily evaluated stream where each element is dependent on the previous?</p>