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



  • (ns-interns ns)
Returns a map of the intern mappings for the namespace.

2 Examples top

  • user=> (take 2 (ns-interns `clojure.core))
    ([sorted-map #'clojure.core/sorted-map] [read-line #'clojure.core/read-line])
    user=> (take 5 (sort (keys (ns-interns `
    (Coercions IOFactory append? as-file as-relative-path)
    user=> (count (ns-interns `clojure.core)) ; only 621 functions to learn :-)
  • ;; See also for information on namespaces in Clojure and how to inspect and manipulate them
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:3248 top

(defn ns-interns
  "Returns a map of the intern 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)
                                 (= ns (.ns v))))
                (ns-map ns))))
Vars in clojure.core/ns-interns: = and defn fn instance? let ns ns-map val
Used in 3 other vars refer formatter all-vars-who-call

Comments top

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