You're viewing version 1.2.0 of ns-refers. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16



  • (ns-refers ns)
Returns a map of the refer mappings for the namespace.

1 Example top

  • user> (ns-refers 'clojure.main)
    {sorted-map #'clojure.core/sorted-map, read-line #'clojure.core/read-line, re-pattern #'clojure.core/re-pattern, keyword? #'clojure.core/keyword?, val #'clojure.core/val, chunked-seq? #'clojure.core/chunked-seq?, *compile-path* #'clojure.core/*compile-path*, ...chop...}
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:3290 top

(defn ns-refers
  "Returns a map of the refer mappings for the namespace."
  {:added "1.0"}
  (let [ns (the-ns ns)]
    (filter-key val (fn [^clojure.lang.Var v] (and (instance? clojure.lang.Var v)
                                 (not= ns (.ns v))))
                (ns-map ns))))
Vars in clojure.core/ns-refers: and defn fn instance? let not= ns ns-map val
Used in 1 other vars ns-refers-by-ns

Comments top

No comments for ns-refers. Log in to add a comment.