sds*_*sds 8

用途values:

(defun foo (x y)
  (values x y (+ x y) (cons x y)))
Run Code Online (Sandbox Code Playgroud)

试试这个功能:

> (foo 2 pi)
2 ;
3.1415926535897932385L0 ;
5.1415926535897932383L0 ;
(2 . 3.1415926535897932385L0)
Run Code Online (Sandbox Code Playgroud)

使用返回的值multiple-value-bind:

(multiple-value-bind (a b sum pair) (foo 1 2)
  (list a b sum pair))
==> (1 2 3 (1 . 2))
Run Code Online (Sandbox Code Playgroud)

(setf values).

另请参阅Common Lisp中的值函数.