Try restarting the repl. It works when I try it:
(def data [[1 1 1 3] [2 2 2 3] [3 2 1 1] [4 3 3 4]])
(def replacements {1 "joe" 2 "fred" 3 "martha"})
(defn test []
(mapv (fn [row] (update row 1 replacements)) data) )
(test) => [[1 "joe" 1 3] [2 "fred" 2 3] [3 "fred" 1 1] [4 "martha" 3 4]]
Another option (my favorite) is to work on such code in a temporary testing namespace (e.g. tst.demo.core), so you have the full editor available, and it is easier to make sure everything is loaded/reloaded correctly.
I also highly recommend the lein-test-refresh plugin for lein.
Another option is to make a new empty directory and start a repl there:
~/expr > mkdir sally
~/expr > cd sally
~/expr/sally > lein repl
user=> (def data [[1 1 1 3] [2 2 2 3] [3 2 1 1] [4 3 3 4]])
#'user/data
user=> (def replacements {1 "joe" 2 "fred" 3 "martha"})
#'user/replacements
user=> (defn test []
#_=> (mapv (fn [row] (update row 1 replacements)) data) )
WARNING: test already refers to: #'clojure.core/test in namespace: user, being replaced by: #'user/test
#'user/test
user=> (test)
[[1 "joe" 1 3] [2 "fred" 2 3] [3 "fred" 1 1] [4 "martha" 3 4]]
Update
Note that in Clojure the file name & directory structure must match the namespace declaration in each file. Thus a file like ./src/fred/core.clj must have a namespace like fred.core, where ./src is a subdirectory of the main project directory (where project.clj lives).
update-in(e.g.(update-in row [1] replacements)) - cfrick