On Fri, Jun 18, 2010 at 6:47 AM, Carson <c.sci.b...@gmail.com> wrote:

> (defn fact [n] (if (zero? n) 1 (* n (fact (dec n)))))
> (defn twice-fact [n] (fact (fact n)))
> (defn bad-twice-fact [n] (fact (-> n fact range last inc)))
>

Not only is it contrived, under the proposal, this implementation of fact is
broken. It needs to be fixed to:

(defn fact [n] (if (zero? n) 1N (* n (fact (dec n)))))

With that change bad-twice-fact is not actually bad.

As Christophe Grand has mentioned one of the main things that is be
complained about from the BigInt supporters *is already a problem* in
Clojure. Nothing new to see here.

Finally having actually tried out the new branches, this is a good change
for me. I'd like to hear more from the BigInt crowd about whether getting
their code to work with the new branches is actually causing problems.

So far it just seems like talk.

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