Re:Show HN: Tail Recursion Optimization for the JVM
by hencq on Wednesday April 22, 2020 @02:14PM
(#22948510)
The use of recur in Clojure is by design. It would have been quite trivial to optimize this type of self recursion, but since it doesn't do general tail call optimization, they introduced the recur keyword. See also [1]. By the way, you don't need to use loop in Clojure either, it also works with functions.
[1]. https://clojure.org/about/functional_programming#_recursive_...