Modify Clojure source code file in clojure
问题 I was wondering if it's possible to load the code contained in a Clojure .clj source file as a list, without compiling it. If I can load a .clj file as a list, I can modify that list and pretty print it back into the same file which can then be loaded again. (Maybe this is a bad idea.) Does anyone know if this is possible? 回答1: A slightly simpler example: user=> (def a '(println (+ 1 1))) ; "'" escapes the form to prevent immediate evaluation #'user/a user=> (spit "test.code" a) ; write it to