<EDIT>
Kind folks on the Clojurians Slack helped me understand how to use iteration
. Turns out it works absolutely fine. Slack thread is here.
The problem was my understanding of :somef
. I was using it like in this Juxt blog post (which is also incorrect) to signal iteration
that there are more pages to fetch. :somef
, instead, means "does the page we fetched contain any data?".
:kf
is what should be used to stop iteration or letting it continue:
If (kf ret) is non-nil it will be passed to the next step call, else iteration will terminate.
The test below can be fixed by removing :somef
altogether as in: