Clojure) public long fib(int n) {! if (n <= 1) {! return n;! } else {! long i = 0, j = 1, sum = 0;! for (long k = 2; k < n; k++) {! sum = i + j;! i = j;! j = sum;! }! return sum;! }! }!
(with-redefs [pure (memoize pure)]! (pure a b)))! (I could get used to with-redefs :) user=> (time (lev/top-down "s0mething" "something"))! "Elapsed time: 2.329673 msecs"! 1!