From: Victor M. Banda
Subject: How return two value from function
Date:
Message-ID: <3167C2B8.2E21@argot.vt.com>
Subject:
How return two value from function?
Date:
Tue, 02 Apr 96 19:37:33 GMT
From:
"Marat M. Khairullin" <···@ugai.kcn.ru>
Reply-To:
···@ugai.kcn.ru
Organization:
Road Police of Tatarstan
Newsgroups:
comp.lang.lisp
;;; Function which returns two values
(funcall #'(lambda ()
(values 'value-one 'value-two)))
> VALUE-ONE
VALUE-TWO
;;; Listing the two values returned
;;; by a function which returns two values
(multiple-value-bind (first-ret-value second-ret-value)
(funcall #'(lambda ()
(values 'value-one 'value-two)))
(list first-ret-value second-ret-value))
> (VALUE-ONE VALUE-TWO)