On 12 Mrz., 07:48, tristan <tristan.k...@gmail.com> wrote: > my clojure version > http://github.com/tristan/project-euler-code/blob/4a17bc271b4b2743ee1...
Not about speed, but about readability: (loop [c primes n #{}] (let [r (loop [b primes n n] (let [r (loop [a primes n n] ...))) You should think about using automatic destructuring of a, b and c. You call many times (first a), (first b) and (first c). If you say you want to call the first of the a primes fa and their rest ra then you could say: (loop [[fa & ra] primes .. Now instead of (first a) you just write fa. And instead of (rest a) you just write ra. Same goes with fb and rb, and fc and rc. This will make your code much more readable. --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---