跳轉到內容

Clojure 程式設計/示例/API 示例/文件

來自華夏公益教科書
user=> (doc +)
-------------------------
clojure.core/+
([] [x] [x y] [x y & more])
  Returns the sum of nums. (+) returns 0.

列印任何變數的文件,其文件或名稱包含與應用引數匹配的內容(正則表示式、字串、模式)。

user=> (find-doc "count")
-------------------------
clojure.core/assoc
([map key val] [map key val & kvs])
  assoc[iate]. When applied to a map, returns a new map of the
    same (hashed/sorted) type, that contains the mapping of key(s) to
    val(s). When applied to a vector, returns a new vector that
    contains val at index. Note - index must be <= (count vector).
-------------------------
clojure.core/count 
...
user=> (use 'clojure.contrib.repl-utils)
user=> (source string?)
(def
 #^{:arglists '([x])
    :doc "Return true if x is a String"}
 string? (fn string? [x] (instance? String x)))
華夏公益教科書