&rest的用法,可否给几个例子
lisp吧
全部回复
仅看楼主
level 3
Instead, Lisp lets you include a catchall parameter after the symbol &rest. If a function includes a &rest parameter, any arguments remaining after values have been doled out to all the required and optional parameters are gathered up into a list that becomes the value of the &rest parameter. Thus, the parameter lists for FORMAT and + probably look something like this:
(defun format (stream string &rest values) ...)
(defun + (&rest numbers) ...)
书上是这么说,一般实际编程的时候都怎么用?
2012年09月18日 03点09分 1
level 13
坐等专业前来解答
2012年09月18日 08点09分 2
level 9
给个简单的例子
2012年09月18日 08点09分 3
level 8
简 〓 
单 我 
的 也 
好 来 
了 一 
〓 个 

2012年09月20日 04点09分 4
1