I'm new to clojure. I'm facing below error -
I created a new lein project using command lein new app clj-lein-app-project.
The project is on github.
Then I created new namespace ns-playground.hello as in here.
The contents of hello.clj is -
(ns ns-playground.hello
(:import [java.util Date]))
(def addition +)
(defn current-date []
"this function returns the current date"
(new Date))
Then I launched the repl using command lein repl -
In repl I did (str "Hello""""world") and (for [el ["element1""element2""element3"]] el) which are working fine.
Then I changed the namespace to ns-playground.hello using command (in-ns 'ns-playground.hello). Now I did (str "Hello""""world") and (for [el ["element1""element2""element3"]] el) but I got below error -
Syntax error compiling at (/private/var/folders/7v/gp_j1tf92xx3m8gxltryr_bmzdys_4/T/form-init6109117777235064500.clj:1:1).
Unable to resolve symbol: for in this context
How the clojure code is not working in different namespace in lein repl?
