2011/1/2 Allen Johnson <akjohnso...@gmail.com>:
> Here is my attempt. I changed the divide to use unchecked-divide-int
> and explicitly cast recur values to long.
>
> http://clojure.pastebin.com/xs79ruw1
>
> Allen


Hi Allen,

Thanks for the effort.

What I don't understand is why one should cast to int or long at all
if the variables "l" and "r" of the loop are ints, and will remain
ints throughout. And k is an int since both r and l are ints, and i
and j will be ints too.

I can't see where the variables are boxed into objects. Both the loop
and the let declare them as primitives if they are given primitives.
Perhaps they are already objects before they reach the inc and dec
function calls in the recur, but if so, it's a mystery to me why.

Albert

-- 
http://albert.rierol.net

-- 
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

Reply via email to