I am wondering what the differences — if any — in the argument vectors of the following two functions. I believe I understand what is going on intuitively, but the first one caught me off guard. Thank you.
From Stackoverflow recursion in clojure
(defn foo
([x] (foo x []))
([x current]
(if (= x 0)
(apply vector (sort < current))
(recur (dec x) (conj current x)))))
and one of my own functions
(defn strip-csv-header
"Pulls out first row from csv data. If column definitions, those will
be removed; else first row of data will be removed."
[csv-data-all]
(let [csv-data (rest csv-data-all)]
csv-data))
fooworks with either one or two parameters whereinstrip-csv-headerwill only function with one parameter.