I have a function that loads expressions from another file, but I donβt know what the file name is, it is stored in a variable:
(defn run-migration [filename] (load filename) (run))
I know that all of these files have a common method called "run". Therefore, I try to call it after loading into this function, but when I try to request this file in repl, I get the error "Unable to resolve the error: execute" before the file is loaded. Apparently, clojure is trying to compile the file, and "run" is not connected at the time, because the download is happening inside the function?
Maybe I'm wrong. Any guidance on a good (idiomatic) way to have a set of files that are loaded and executed at runtime?
source share