Clojure is saying that I can\'t call recur
from a non-tail-position.
Is this not the tail position?
What is the tail position in my loop th
for
does not do what you think it does; it is not an imperative loop. It is a list comprehension, or sequence-generator. Therefore, there is not a return or iterate call at its end, so you cannot place recur
there.
It would seem you probably do not need either loop
or recur
in this expression at all; the for
is all you need to build a sequence, but it's not clear to me exactly what sequence you wish to build.