Skip to content

Instantly share code, notes, and snippets.

@sorenmacbeth
Created August 2, 2013 22:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sorenmacbeth/72499f3b2a5f13012576 to your computer and use it in GitHub Desktop.
Save sorenmacbeth/72499f3b2a5f13012576 to your computer and use it in GitHub Desktop.
public static IFn loadClojureFn(String namespace, String name) {
try {
clojure.lang.Compiler.eval(RT.readString("(require '" + namespace + ")"));
} catch (Exception e) {
//if playing from the repl and defining functions, file won't exist
}
return (IFn) RT.var(namespace, name).deref();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment