I see the following pattern in several places of clojure.core
:
(if (next more)
(recur ... (next more))
...)
where next
is invoked twice before recur
.
Is it “by design” or just unobserved code?
I expect a little more performant implementation like:
(if-let [next' (next more)]
(recur ... next')
...)