10 2013 档案

摘要:返回多值:(values 1 2 3) => 1 2 3 或: (gethash 'a x) => 100 T 都是多值返回的例子。多值的接收:如多接收函数多个值的返回呢?用multiple-value-bind:(multiple-value-bind (x y) (gethash 'a x) (if y (print "true") (print "err"))) =>true你可以通过multiple-value-call将多值应用到第二个函数上:(multiple-value-call#'+(values 阅读全文
posted @ 2013-10-22 16:35 误会僧 阅读(460) 评论(0) 推荐(0) 编辑