On Mon, Oct 1, 2012 at 8:29 PM, Mark Engelberg <mark.engelb...@gmail.com> wrote:
> On Mon, Oct 1, 2012 at 4:45 PM, Grant Rettke <gret...@acm.org> wrote:
> This naming of a helper function to "loop" is non-idiomatic, because there
> is a built-in construct "loop", which works somewhat like named let in
> Scheme (without the name), allowing you to combine the function definition
> and the initial values at once.  Idiomatic version of this would be:

Oh ok.

> There's a subtle concern here though.  Clojure, by default, uses longs.  If
> you try to do something large, like (acc-pow 2 500), you'll get an overflow
> error.  One easy fix is to change the 1 to 1N, and then you'll get boxed
> numerics.  Another option is to change * to *'.

Nice.

Thanks for the feedback everybody.

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