Friday, July 1, 2011

Project Euler Solutions in Clojure

In my pursuit of learning Clojure, I worked on a few of the Project Euler problems.  They were fun at first; but they get boring rather quickly (it's a lot of number theory type stuff). 

I got through the first 9 problems.  The following are the solutions in Clojure.  Each solution is contained within a box that you need to click to expose the code.

Keep in mind doing these problems has been a vehicle for me for exploring the Clojure language --- I'm sure to a Clojure guru, my code below is pretty crude.

I also apologize for the formatting of the code. My nice indenting was lost when I copied and pasted the code to my blog editor.

Enjoy!

Project Euler: Problem # 1
Show Code

Project Euler: Problem # 2
Show Code

Project Euler: Problem # 3
Show Code

Project Euler: Problem # 4
Show Code

Project Euler: Problem # 5
Show Code

Project Euler: Problem # 6
Show Code

Project Euler: Problem # 7
Show Code

Project Euler: Problem # 8
Show Code

Project Euler: Problem # 9
Show Code