Skip to content

Instantly share code, notes, and snippets.

@jaredcacurak
Created January 25, 2011 22:31
Show Gist options
  • Select an option

  • Save jaredcacurak/795832 to your computer and use it in GitHub Desktop.

Select an option

Save jaredcacurak/795832 to your computer and use it in GitHub Desktop.
A Clojure solution for Project Euler - Problem 2
(def fibs
(map first
(iterate (fn [[a b]] [b (+ a b)]) [0 1])))
(reduce +
(take-while
(partial > 4000000) (filter even? fibs)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment