orchard.meta

Utility functions for extracting and manipulating metadata.

macroexpand-all

(macroexpand-all form & [original-key])
Like clojure.walk/macroexpand-all, but preserves and macroexpands
metadata. Also store the original form (unexpanded and stripped of
metadata) in the metadata of the expanded form under original-key.

merge-meta

(merge-meta obj & metamaps)
Non-throwing version of (vary-meta obj merge metamap-1 metamap-2 ...).
Like `vary-meta`, this only applies to immutable objects. For
instance, this function does nothing on atoms, because the metadata
of an `atom` is part of the atom itself and can only be changed
destructively.

meta+

(meta+ v)
Return special form or var's meta.

ns-meta

(ns-meta ns)

resolve-aliases

(resolve-aliases ns)

resolve-var

(resolve-var ns sym)

special-forms

Special forms that can be apropo'ed.

special-sub-symbs

special-sym-meta

(special-sym-meta sym)
Return info for the symbol if it's a special-symbol?, or nil otherwise.

strip-meta

(strip-meta form)(strip-meta form keys)
Strip meta from form.
If keys are provided, strip only those keys.

var-code

(var-code v)
Find the source of the var `v`.
Return a map of the var's metadata (:file, :line, :column, etc.) as well as:
  - :form : The form, as read by `clojure.core/read`, and
  - :code : The source code of the form
Return nil if the source of the var cannot be found.

var-doc

(var-doc v)(var-doc n v)
Return special form or var's docstring, optionally limiting the number of
sentences returned to n.

var-meta

(var-meta v)(var-meta v whitelist)
Return a map of metadata for var v.
If whitelist is missing use var-meta-whitelist.

var-meta-whitelist

var-name

(var-name v)
Return special form or var's namespace-qualified name as string.