Say I have 2 functions add1 & sub1, as defined below. From these functions I create a vector funclist.
(defn add1
[x]
(+ x 1))
(defn sub1
[x]
(- x 1))
(def funclist (vec '(add1 sub1)))
Suppose now on this list of functions, I want to run a map as below
(map #(% 3) funclist)
This gives me
=> (nil nil)
I was expecting (4 2)...
. What am I doing wrong?
I am a complete Clojure noob... just FYI
-Abe