Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Load the Clojure script -- as a side effect this initializes the runtime.
- String str = "(ns user) (defn foo [a b] (str a \" \" b))";
- //RT.loadResourceScript("foo.clj");
- clojure.lang.Compiler.load( new java.io.StringReader(str) );
- // Get a reference to the foo function.
- clojure.lang.Var foo = clojure.lang.RT.var("user", "foo");
- // Call it!
- Object Clojure_result = foo.invoke("Hi", "there");
Advertisement
Add Comment
Please, Sign In to add comment