Thanks a lot, Adrian.
Adrian Cuthbertson wrote:
> You can use the following;
>
> (defn frm-save
> "Save a clojure form to file."
> [#^java.io.File file form]
> (with-open [w (java.io.FileWriter. file)]
> (binding [*out* w *print-dup* true] (prn frm
>
> (defn frm-load
> "Load a cloj
Sorry, (prn frm) should have been (prn form).
On Wed, Jun 24, 2009 at 5:33 AM, Adrian Cuthbertson <
adrian.cuthbert...@gmail.com> wrote:
> You can use the following;
>
> (defn frm-save
> "Save a clojure form to file."
> [#^java.io.File file form]
> (with-open [w (java.io.FileWriter. file)]
>
You can use the following;
(defn frm-save
"Save a clojure form to file."
[#^java.io.File file form]
(with-open [w (java.io.FileWriter. file)]
(binding [*out* w *print-dup* true] (prn frm
(defn frm-load
"Load a clojure form from file."
[#^java.io.File file]
(with-open [r (java.i
Dear all,
Is there an inverse function of load or load-file.
I mean the "save" function which writes the clojure variables or
entire workspace context (in textual form) to the file?
That we can load-file on such file and get the same variables as when
"save" was originally invoked.
--~--~