I'm learning Clojure. I wrote a first-attempt at calculating a Fibonacci number. Here's my code and the subsequent error message. I have NO CLUE what to correct. My question is: WHAT is the error message trying to say?
(defn fibon
(fn [n]
(loop [loops n acc 1N acc2 0N]
(if (<= loops 0)
acc ;; Return the summed F number.
(recur (dec loops) (+ acc acc2) acc)))))
Syntax error macroexpanding clojure.core/defn at (form-init1248982153229513778.clj:1:1). fn - failed: vector? at: [:fn-tail :arity-n :bodies :params] spec: :clojure.core.specs.alpha/param-list (fn [n] (loop [loops n acc 1N acc2 0N] (if (<= loops 0) acc (recur (dec loops) (+ acc acc2) acc)))) failed: vector? at: [:fn-tail :arity-1 :params] spec: :clojure.core.specs.alpha/param-list
In general, could someone please point me to some documentation on Clojure in Cursive so I can decipher these error messages myself, if there is such a beast. Thank you.