Hello, Clojure.
I’ve recently finished reading my first book on Clojure, and I am pretty fascinated by this pure functional JVM programming language. I’ve been doing some FP in JavaScript over the past year, but Clojure is still quite eye opening.
So, what do I do with this new language? Fibonacci numbers of course.
My first (naive) approach to Fibonacci on Clojure was recursion (surprise, still sucks), then I tried my hand at a poorly implemented memoization version, and after speaking with some people in IRC, I landed on this approach:
Whats fascinating about this approach is that it utilizes one of the most interesting apsects of Clojure: lazy evaluation. This approach feels as close to linear as possible, even in large scale numbers (2000, 10000, 100000), and utilizes about 67 MB of constant memory, while distributing the computations across all available cores.
Yeah. Excited to be continuing my journey of FP, onward!
Also, excited to be attending the Clojure/West conference in March, I’ll see you there!











