The
(defun cl:values-list (list)
(or (listp list) (error "not a list" list))
(or (null list) (consp (last list)) (error "not a proper list" list))
(setq *rslt* list
cl:*multiple-values* t)
(first list))
The unevaluated first value from the list is returned as the primary
return value, and the list is assigned to the Nyquist
*rslt* variable.
Examples:
(cl:values-list nil) => NIL ; *rslt* = NIL (cl:values-list '(1)) => 1 ; *rslt* = (1) (cl:values-list '(1 2)) => 1 ; *rslt* = (1 2) (cl:values-list '(1 2 3)) => 1 ; *rslt* = (1 2 3) (cl:values-list '(1 2 . 3)) => error: not a proper list - (1 2 . 3)