I had a feeling this was due to laziness. Thanks for your help. It works
now.
On Thursday, February 21, 2013 1:35:19 PM UTC-5, Michael Klishin wrote:
>
>
> 2013/2/21 Roland Pinto >
>
>> But if I run lein uberjar and do a java -jar target/file.jar it doesnt do
>> anything at all
>
>
> clojure.cor
2013/2/21 Roland Pinto
> But if I run lein uberjar and do a java -jar target/file.jar it doesnt do
> anything at all
clojure.core/map is lazy. REPL forces evaluation because it needs to print
results
to you.
Wrap map in doall (if you need returned values) or dorun (if you only want
side effect
So, i have function that looks something like this :
(defn insert-to-db [some-list]
(map #(db/with-connection pool (db/insert-records :courses %)) some-list))
some-list here is just a list of hashmaps I want to insert and I'm calling
this function from -main
This works perfectly with lein repl