I started with a db example and dropped this into the core.clj of an 'app'
project, just before the defn for -main.
(sql/with-connection db
(sql/with-query-results rs ["select * from foo limit 3"]
(dorun (map #(println %) rs))))
On "lein run" this prints three rows, but prints them twice. If I move this
inside the defn for -main, it prints them once.
I'm not sure what's going on. Is core.clj is being evaluated twice on the
way up?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en