News for hackers. Stuff that matters.
Re:Good design for Humans by cr__ on Tuesday May 29, 2018 @02:30PM (#17181790)
Sure you can, you just have to make the recursive call explicit:

https://clojurebridge.github.io/community-docs/docs/clojure/...

This has the nice side effect of preventing you from writing a function that you think will be tail call optimized but really isn’t—the compiler will yell if your call to `recur` isn’t in tail position.

The code in the article doesn’t have the recursive call in tail position anyway, so it’s not like other languages would be able to optimize it away.

There are no comments on this comment yet.