1.3.0 permalink 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 `clojure.java.io))))
    (Coercions IOFactory append? as-file as-relative-path)
    user=> (count (ns-interns `clojure.core)) ; only 621 functions to learn :-)
  • ;; See also http://clojure.org/namespaces 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:3734 top

(defn ns-interns
  "Returns a map of the intern mappings for the namespace."
  {:added "1.0"
   :static true}
  (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:
Used in 0 other vars

Comments top

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