Skip to content

Instantly share code, notes, and snippets.

@6ewis
Created March 24, 2015 22:21
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 6ewis/366d4aec2228e86d0ad2 to your computer and use it in GitHub Desktop.
Save 6ewis/366d4aec2228e86d0ad2 to your computer and use it in GitHub Desktop.
;;part I
(defn file-logger
[file]
#(with-open [f (clojure.java.io/writer file :append true)]
((print-logger f) %)))
;;part 2
(def log-> file (file-logger "message.log"))
(log->file "hello")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment