Skip to content

Instantly share code, notes, and snippets.

@boechat107
Created July 4, 2012 20:44
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 boechat107/3049456 to your computer and use it in GitHub Desktop.
Save boechat107/3049456 to your computer and use it in GitHub Desktop.
Write a Clojure data to a file
;; 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