On Thu, Sep 15, 2011 at 10:50 AM, David Nolen <dnolen.li...@gmail.com> wrote:
> On Thu, Sep 15, 2011 at 3:18 AM, Sergey Didenko <sergey.dide...@gmail.com>
> wrote:
>> Auto-boxing loop arg: change"
>>
>> (loop [x 1 changed 0]
>>  (if (= x 10)
>>    changed
>>    (recur (inc x)
>>           (loop [y 1 changed-y changed]
>>             changed-y))))
>
> Loop itself will return boxed values I think.
> David

It shouldn't, if all the return paths out of the loop return an
unboxed primitive of the same type and an unboxed primitive of that
type is an acceptable input to the enclosing expression, which is the
case here.

-- 
Protege: What is this seething mass of parentheses?!
Master: Your father's Lisp REPL. This is the language of a true
hacker. Not as clumsy or random as C++; a language for a more
civilized age.

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