Back
dir-fn (clj)
(source)function
(dir-fn ns)
Returns a sorted seq of symbols naming public vars in
a namespace or namespace alias. Looks for aliases in *ns*
Examples
cognitect/clojure-lab
;; @@
(require '[clojure.repl :refer :all])
;; @@
;; @@
(dir clojure.repl)
;; @@
;; ->
;;; apropos
;;; demunge
;;; dir
;;; dir-fn
;;; doc
;;; find-doc
;;; pst
;;; root-cause
;;; set-break-handler!
;;; source
;;; source-fn
;;; stack-element-str
;;; thread-stopper
;;;
;; <-
;; =>
;;; {"type":"html","content":"<span class='clj-nil'>nil</span>","value":"nil"}
;; <=
;; @@
(source dir)
;; @@
;; ->
;;; (defmacro dir
;;; "Prints a sorted directory of public vars in a namespace"
;;; [nsname]
;;; `(doseq [v# (dir-fn '~nsname)]
;;; (println v#)))
;;;
;; <-
;; =>
;;; {"type":"html","content":"<span class='clj-nil'>nil</span>","value":"nil"}
;; <=
reborg/clojure-essential-reference
(require 'clojure.java.browse)
(require '[clojure.repl :refer [dir-fn]]) ; <1>
(apply str (interpose "," (dir-fn 'clojure.java.browse))); <2>
;; "*open-url-script*,browse-url"
reborg/clojure-essential-reference
(require '[clojure.repl :refer [dir-fn dir]])
(require 'clojure.set)
(dir-fn 'clojure.set) ; <1>
;; (difference index intersection
;; join map-invert project rename
;; rename-keys select subset?
;; superset? union)
reborg/clojure-essential-reference
(require '[clojure.repl :refer [dir-fn dir]])
(dir-fn 'clojure.set) ; <1>
;; (difference index intersection
;; join map-invert project rename
;; rename-keys select subset?
;; superset? union)