ClojureDocs

导航

命名空间

refer

clojure.core

自 1.0 起可用 ()
  • (refer ns-sym & filters)
refers to all public vars of ns, subject to filters.
filters can include at most one each of:
 :exclude list-of-symbols
:only list-of-symbols
:rename map-of-fromsymbol-tosymbol
 For each public interned var in the namespace named by the symbol,
adds a mapping from the name of the var to the var to the current
namespace.  Throws an exception if name is already mapped to
something else in the current namespace. Filters can be used to
select a subset, via inclusion or exclusion, or to provide a mapping
to a symbol different from the var's name, in order to prevent
clashes. Use :use in the ns macro in preference to calling this directly.