re: Project Euler #2 - Even Fibonacci numbers VIEW POST

FULL DISCUSSION
 

Clojure 5-10ms

(def fib (lazy-cat [1 1] (map + (rest fib) fib)))
(defn euler2 [] (reduce + (filter even? (take-while (fn [x] (< x 4000000)) fib))))
(euler2)
code of conduct - report abuse