On Thu, Apr 2, 2009 at 1:10 PM, Bradford Cross <bradford.n.cr...@gmail.com> wrote: > What is the current state of the art for language implementers working > around these issues (tail calls, continuations, etc) in Clojure, Scala, > JRuby, etc?
Clojure uses recur (http://clojure.org/special_forms#toc10), "the only non-stack-consuming looping construct in Clojure". Here's the factory example from that page: (def factorial (fn [n] (loop [cnt n acc 1] (if (zero? cnt) acc (recur (dec cnt) (* acc cnt)))))) Jim -- Jim Menard, j...@io.com, jim.men...@gmail.com http://www.io.com/~jimm/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to jvm-languages@googlegroups.com To unsubscribe from this group, send email to jvm-languages+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---