Back

find-doc (clj)

(source)

function

(find-doc re-string-or-pattern)
Prints documentation for any var whose documentation or name contains a match for re-string-or-pattern

Examples

cognitect/clojure-lab
;; @@
(require '[clojure.repl :refer :all])
;; @@

;; **
;;; For now, you can treat that as a magic incantation. Poof! We'll unpack it when we get to namespaces. 
;;; 
;;; We now have access to some additional functions that are useful at the REPL: `doc`, `find-doc`, `apropos`, `source`, and `dir`.
;;; 
;;; The `doc` function displays the documentation for any function. Let's call it on `+`:
;; **

;; **
;;; You can also widen your search to include the docstrings themselves with `find-doc`:
;; **

;; @@
(find-doc "trim")
;; @@
;; ->
;;; -------------------------
;;; clojure.core/subvec
;;; ([v start] [v start end])
;;;   Returns a persistent vector of the items in vector from
;;;   start (inclusive) to end (exclusive).  If end is not supplied,
;;;   defaults to (count vector). This operation is O(1) and very fast, as
;;;   the resulting vector shares structure with the original and no
;;;   trimming is done.
;;; -------------------------
;;; clojure.string/trim
;;; ([s])
;;;   Removes whitespace from both ends of string.
;;; -------------------------
;;; clojure.string/trim-newline
;;; ([s])
;;;   Removes all trailing newline \n or return \r characters from
;;;   string.  Similar to Perl's chomp.
;;; -------------------------
;;; clojure.string/triml
;;; ([s])
;;;   Removes whitespace from the left side of string.
;;; -------------------------
;;; clojure.string/trimr
;;; ([s])
;;;   Removes whitespace from the right side of string.
;;; 
;; <-
;; =>
;;; {"type":"html","content":"<span class='clj-nil'>nil</span>","value":"nil"}
;; <=

;; @@
(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"}
;; <=

;; **
;;; Using `find-doc`, find the function that prints the stack trace of the most recent REPL exception.
;; **
hatemogi/misaeng
(ns 미생.레플
  (:use [미생.기본])
  (:require [clojure.repl]))

(매크로대응 설명 clojure.repl/doc)
(매크로대응 소스 clojure.repl/source)
(매크로대응 열람 clojure.repl/dir)
(매크로대응 설명찾기 clojure.repl/find-doc)
(매크로대응 정의현황 clojure.repl/apropos)
(정의* pst clojure.repl/pst
       demunge clojure.repl/demunge)