重慶崽兒 发表于 2015-5-31 00:36:01

vl-sort执行顺序,请各位老师说说,谢谢

本帖最后由 重慶崽兒 于 2015-5-31 00:42 编辑

(vl-sort '((1 3) (2 2) (3 1)) (function (lambda (e1 e2) (< (cadr e1) (cadr e2)))))
如上,这句话的执行顺序是怎么样的啊?
第一次比较(1 3)和(2 2)第二次是哪两个比较啊
额,还有就是其中funtion的作用,好像不用function也是可以的吧

dbqtju 发表于 2015-5-31 08:46:49

可以在visual lisp editor里跟踪一下。
帮助文件内解释:Tells the Visual LISP compiler to link and optimize an argument as if it were a built-in function

(function symbol | lambda-expr)
The function function is identical to the quote function, except it tells the Visual LISP compiler to link and optimize the argument as if it were a built-in function or defun.

Compiled lambda expressions that are quoted by function will contain debugging information when loaded into the Visual LISP IDE

重慶崽兒 发表于 2015-5-31 20:08:12

dbqtju 发表于 2015-5-31 08:46 static/image/common/back.gif
可以在visual lisp editor里跟踪一下。
帮助文件内解释:Tells the Visual LISP compiler to link and opt ...

3Q谢谢
页: [1]
查看完整版本: vl-sort执行顺序,请各位老师说说,谢谢