Created
March 20, 2014 17:32
-
-
Save quoll/9669333 to your computer and use it in GitHub Desktop.
It's turtles all the way down!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns turtles | |
(import [javax.script ScriptEngineManager])) | |
(defn -main [& args] | |
(let [e (.getEngineByName (ScriptEngineManager.) "nashorn")] | |
(.eval e | |
"var Clojure = Java.type('clojure.java.api.Clojure'); | |
var hello = Clojure.var('turtles', 'hello'); | |
hello.invoke();" | |
))) | |
(defn hello [] | |
(println "Hello, World!")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requires at least Clojure 1.6 and JDK 8