On Jun 19, 2010, at 14:18 , David Powell wrote:
> 
>  (loop [^int n 1 r 1](if (zero? n) r (recur (dec n) (* r 0.2))))
> 
> 
> Numeric literals would still produce primitives where possible, but
> would get auto-boxed in loop initialisers.
> 
> I think this option wouldn't have any nasty surprises.
> 
+41 (would be 42 if it were ^long since it is the clojure type I think)

This gives the option of make it fast if you know-what-you-are-doing(TM) which 
is great, and I certainly would use that myself :P but it still keeps the 
things simple and working for the default case.

Regards,
Heinz

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