On 9 March 2010 15:59, jshore <jonathan.sh...@gmail.com> wrote: [...] > (defn fib [a] > (let [v (int a)] > (if (< v (int 2)) > v > (+ (fib (- v (int 1))) (fib (- v (int 2))))))) > > I suspect that on recursion a will become an object again and will > then need to be downcasted again as well. [...]
Yes, but if your recursion is happening from the tail position, you can use (loop ... (recur)) as a workaround. (Obviously not in the above case.) -- Michael Wood <esiot...@gmail.com> -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en