Type conversion and generating big Fibonacci numbers in Clojure
Notes
;; bigger_fibonacci.clj
(def fib (memoize
(fn [index]
(case index
1 0
2 1
(+
(bigint (fib (dec index)))
(bigint (fib (- index 2))))))))
;; memonize_fib_right_way.clj
(def fib (memoize
(fn [index]
(case index
1 0
2 1
(+
(fib (dec index))
(fib (- index 2)))))))
(fib 52)