These are my solutions to the Project Euler problems. This project has several goals:
- Help me master VimClojure
- Explore the use of the ->> (thread-last) macro for enhancing readability. The ->> macro forces me to keep my functions short, and reenforces the representation of a function as a transformation from inputs to outputs, which is an appropriate metaphor in many cases.
- Explore clojure.test, especially the with-test macro, which puts tests and code together, helping me to develop a more test-driven style.
roo:euler wmorgan$ lein repl
user=> (use 'euler.problems')
nil
user=> (problem-1)
"Elapsed time: 16.784 msecs"
233168
user=> (problem-12)
"Elapsed time: 1415.429 msecs"
76576500
Each problem function takes an optional integer argument specifying the maximum number of seconds it can run for. The default is 10 seconds.
Copyright (C) 2010 Will Morgan
Distributed under the Eclipse Public License, the same as Clojure.