Created
July 4, 2012 20:44
-
-
Save boechat107/3049456 to your computer and use it in GitHub Desktop.
Write a Clojure data to a file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Write a map structure to a file. | |
(spit "filename.txt" (prn-str {:a 10, :b 20})) | |
;; Read the map structure from the same file. | |
(read-string (slurp "filename.txt")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment