On 11 Jun 2010, at 20:35, Russell Christopher wrote:
> didn't need the assoc in my previous try
>
> (defn of [n]
> (letfn [(f [res k]
> (if (= 0 (rem (:n res) k))
> {:n (/ (:n res) k) :fs (conj (:fs res) k)}
> res))]
> (:fs (reduce f {:n n :fs []} (range 2 n)))))
The two give different answers. Given n=144, your version produces [2 3 4 6]
and Uncle Bob's produces [2 2 2 2 3 3].
-Steve
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en