I'm trying to run a short Clojure program in IntelliJ\Cursive. My program includes two files:
project.clj:
(defproject try3 "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]]
:main try3.core)
and:
core.clj:
(ns try3.core)
(defn foo
"I don't do a whole lot."
[x]
(println x "Hello, World!"))
(defn -main [] (println "hi"))
I want that when I run the project, the -main function will run automatically. What do I have to do to make this happen?