Skip to content

Instantly share code, notes, and snippets.

@AeroNotix
Created July 27, 2014 12:45
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 AeroNotix/cba1855cc8bf18f0b612 to your computer and use it in GitHub Desktop.
Save AeroNotix/cba1855cc8bf18f0b612 to your computer and use it in GitHub Desktop.
user=> (require '[clojure.java.io :as io])
nil
(defmacro my-macro [my-file] (println (slurp (io/file
my-file))))
#'user/my-macro
user=> (my-macro "/home/xeno/f")
31.172.179.13831.172.179.13831.172.179.138
user=> (def c "/home/xeno/f")
#'user/c
user=> (my-macro c)
IllegalArgumentException No implementation of method: :as-file of protocol: #'clojure.java.io/Coercions found for class: clojure.lang.Symbol clojure.core/-cache-protocol-fn (core_deftype.clj:544)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment