Re: multiple-value-bind only accepts symbols
- From: Philippe Lorin <palpalpalpal@xxxxxxxxx>
- Date: Mon, 17 Oct 2005 13:14:17 +0200
Juho Snellman wrote:
Because that's not what binding means (have a look at the CLHS glossary).
Ok, but then the question only becomes, why do we have "multiple-value-bind" rather than something like "multiple-value-setf". But with the solution you provided, I can see that question is stupid.
The less ugly way to write this is:
(setf (values (slot-a x) (slot-b x)) (some-function-that-returns-two-values))
Nice! My mind has not yet been warped enough to the Lisp way so that I could think of this by myself. I find this beautiful. Thank you!
.
- Follow-Ups:
- Re: multiple-value-bind only accepts symbols
- From: Peter Seibel
- Re: multiple-value-bind only accepts symbols
- References:
- multiple-value-bind only accepts symbols
- From: Philippe Lorin
- Re: multiple-value-bind only accepts symbols
- From: Juho Snellman
- multiple-value-bind only accepts symbols
- Prev by Date: Lisp and OpenGL on Unix
- Next by Date: Re: what the following code do
- Previous by thread: Re: multiple-value-bind only accepts symbols
- Next by thread: Re: multiple-value-bind only accepts symbols
- Index(es):
Relevant Pages
|