Subject: Re: multiple-values and `let' From: Erik Naggum <email@example.com> Date: 1998/07/28 Newsgroups: comp.lang.lisp Message-ID: <firstname.lastname@example.org> * Kent M Pitman | There was an alternate "evolutionary path" in the design that was killed | off probably because it just came too late, and it looked like this: | (let (((list a b) '(1 2))) (list b a)) => (2 1) | To which you might say "ick" (which may also be why it died), but | consider that it was more like SETF. The defmacro-style destructuring | could not support abstractions like the setf-style one could. Consider: | (let ((`(,a ,b) '(1 2))) (cons a b)) | OR | (defmacro make-foo (x y) `(,x ,y)) | (defun frob-foo (the-foo) | (let (((make-foo a b) the-foo)) (make-foo b a))) | where I don't know the expansion of make-foo (but the compiler does). | OR | (let (((values q r) (truncate x y))) (list q r)) | which is the one you were asking about. there appears to have been several experiments with LET some years ago, but not very much of it seems to have survived. in addition to Marco Antoniotti's LETBIND, I came across many versions of LETF about the same time (1994-10). LETF binds places like SETF. although various versions of LETF float around, I haven't found one that does multiple values right and the version I hacked to handle it doesn't bind new variables, it only deals with existing bindings. that may or may not be the right thing, of course. is there a "definitive" LETF somewhere? #:Erik -- http://www.naggum.no/spam.html is about my spam protection scheme and how to guarantee that you reach me. in brief: if you reply to a news article of mine, be sure to include an In-Reply-To or References header with the message-ID of that message in it. otherwise, you need to read that page.