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))))
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close