How can i implement "doc" function in clisp?
In clojure, i can use doc as below:
Clojure> (doc juxt)
-------------------------
clojure.core/juxt
([f] [f g] [f g h] [f g h & fs]) Alpha - name subject to change. Takes a set of functions and returns a fn that is the juxtaposition of those fns. The returned fn takes a variable number of args, and returns a vector containing the result of applying each fn to the args (left-to-right). ((juxt a b c) x) => [(a x) (b x) (c x)]enter code here
It seems there is no such a开发者_如何转开发 function in clisp ? Then how can i implement such a function ?
Sincerely!
Lisp has Documentation Strings.
For example:
[1]> (defun sqr (x)
"Returns the square of x"
(* x x))
SQR
[2]> (documentation 'sqr 'function)
"Returns the square of x"
[3]>
Refer to the Hyperspec or this less detailed explanation for more details.
describe
works:
(describe #'expt)
#<SYSTEM-FUNCTION EXPT> is a built-in system function.
Argument list: (#:ARG0 #:ARG1)
For more information, evaluate (DISASSEMBLE #'EXPT).nter code here
精彩评论