Liking cljdoc? Tell your friends :D
Clojure only.

com.wsscode.misc.macros


full-symbolclj

(full-symbol sym fallback-ns)

Helper to expand symbol name during macro compilation. When symbol is qualified it is returned as is, otherwise fallback-ns is set as the namespace.

Example usage:

(defmacro defsomething [id options]
  (let [fqsym (full-symbol id (str *ns*)))]
    `(def ~id (assoc options ::id '~fqsym))))
Helper to expand symbol name during macro compilation. When symbol is qualified
it is returned as is, otherwise fallback-ns is set as the namespace.

Example usage:

    (defmacro defsomething [id options]
      (let [fqsym (full-symbol id (str *ns*)))]
        `(def ~id (assoc options ::id '~fqsym))))
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close