Hi, I've a code like this. I can run this in repl but can't from command line. I guess i've a lazy evaluation problem.
; items.clj
(def items (ref []))
(defn init-items []
(map
#(dosync
(alter items conj %))
["foo" "bar" "baz" ] ))
(init-items)
(println (first @items))
$ java -jar clojure.jar items.clj
$ nil
Regards.