0

在clojure中,我可以使用如下文档:

Clojure> (doc juxt)
-------------------------
clojure.core/juxt

([f] [fg] [fgh] [fgh & fs]) 字母 - 名称可能会发生变化。接受一组函数并返回一个 fn,它是这些 fns 的并列。返回的 fn 采用可变数量的 args,并返回一个向量,其中包含将每个 fn 应用于 args 的结果(从左到右)。((juxt abc) x) => [(ax) (bx) (cx)]在此处输入代码

clisp 中似乎没有这样的功能?那么我该如何实现这样的功能呢?

真挚地!

4

2 回答 2

2

Lisp 有文档字符串。

例如:

[1]> (defun sqr (x)
       "Returns the square of x"
       (* x x))
SQR
[2]> (documentation 'sqr 'function)
"Returns the square of x"
[3]> 

有关更多详细信息,请参阅Hyperspec或此不太详细的说明

于 2011-09-28T03:38:39.583 回答
2

describe作品:

(describe #'expt)
#<SYSTEM-FUNCTION EXPT> is a built-in system function.
Argument list: (#:ARG0 #:ARG1)
For more information, evaluate (DISASSEMBLE #'EXPT).nter code here
于 2011-09-28T05:11:30.820 回答