;; metadata.clj (def ^:boo some-var-with-meta 7) ;; => #'user/some-var-with-meta (def some-var 7) ;; => #'user/some-var (= some-var some-var-with-meta) ;; => true (meta #'some-var-with-meta) ;; => {:boo true, :line 1, :column 1, :file "/Users/mindaslab/author/clojure/code/meta_data.clj", :name some-var-with-meta, :ns #object[clojure.lang.Namespace 0xf7f1972 "user"]} (def ^{:a 1 :b 2 :c 3} lots-of-meta 42) ;; => #'user/lots-of-meta (meta #'lots-of-meta) ;; => {:a 1, :b 2, :c 3, :line 13, :column 1, :file "/Users/mindaslab/author/clojure/code/meta_data.clj", :name lots-of-meta, :ns #object[clojure.lang.Namespace 0xf7f1972 "user"]} (def my-list (with-meta '(1 2 3) {:secret "meta"})) ;; => #'user/my-list my-list ;; => (1 2 3) (meta my-list) ;; => {:secret "meta"} (defn ^:something my-function [] "some function") ;; => #'user/my-function (my-function) ;; => "some function" (meta #'my-function) ;; => {:something true, :arglists ([]), :line 29, :column 1, :file "/Users/mindaslab/author/clojure/code/meta_data.clj", :name my-function, :ns #object[clojure.lang.Namespace 0xf7f1972 "user"]} (defn function-with-doc "This is a function with doc string" [] (println "some function")) ;; => #'user/function-with-doc (:doc (meta #'function-with-doc)) ;; => "This is a function with doc string" (defn ^{:a 1 :b 2 :c 3} lots-of-meta-my-function [] "some function") ;; => #'user/los-of-meta-my-function (meta #'lots-of-meta-my-function) ;; => {:ns #object[clojure.lang.Namespace 0xf7f1972 "user"], :name los-of-meta-my-function, :file "/Users/mindaslab/author/clojure/code/meta_data.clj", :column 1, :c 3, :line 52, :b 2, :arglists ([]), :a 1}