Is there a `recur` syntax to call the current function?

IIUC, Clojure has to workaround the problem that JVM does not have TCO. So I guess it makes sense for Clojure to use recur?

In Julia, I think recurring to the same method makes less sense as the plain for syntax is more idiomatic way to write loops. But it’d be nice to have a syntax for tail-call into different method since, in principle, the compiler can build a finite state machine out of this. This would be more powerful tool than union splitting when writing generic reductions: Tail-call optimization and function-barrier -based accumulation in loops

3 Likes