4 ms·
Nice but all you're proving is that you know Ruby and you don't know Clojure. I'll gladly admit I don't know Ruby. (defn fib [n a b lim] (if (< b lim) (recur
by swannodette 17y ago
Nice but all you're proving is that you know Ruby and you don't know Clojure. I'll gladly admit I don't know Ruby.
(defn fib [n a b lim] (if (< b lim) (recur (inc n) b (+ a b) lim) n))
(fib 1 0 1 (.pow (BigInteger/TEN) 999))
~0.0014 on my machine.
EDIT: I don't condone the article at all, it's link bait. And I think it's silly that people get up in arms about articles like this. Ruby is great. Haskell is great. Haskell and Clojure are really fast. End of story.