3 ms·
Clojure uses [] and {}, eg. : (defn fib [x, n] (if (< (count x) n) (fib (conj x (+ (last x) (nth x (- (count x) 2)))) n) x))
by moonchrome 4y ago
Clojure uses [] and {}, eg. :
(defn fib [x, n]
(if (< (count x) n)
(fib (conj x (+ (last x) (nth x (- (count x) 2)))) n)
x))