home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!newsserver.jvnc.net!yale.edu!ira.uka.de!rz.uni-karlsruhe.de!ma2s3!haible
- From: haible@ma2s3.uucp (Bruno Haible)
- Newsgroups: comp.lang.lisp
- Subject: Re: (SETF VALUES)
- Date: 12 Jan 1993 15:50:58 GMT
- Organization: University of Karlsruhe, Germany
- Lines: 26
- Sender: <haible@ma2s2.mathematik.uni-karlsruhe.de>
- Message-ID: <1iupd2INN42h@nz12.rz.uni-karlsruhe.de>
- References: <SJAMESON.93Jan8084615@fergie.atl.ge.com> <1imgf4INNmf@early-bird.think.com> <SJAMESON.93Jan11145337@fergie.atl.ge.com>
- NNTP-Posting-Host: ma2s3.mathematik.uni-karlsruhe.de
- Summary: multiple-value-setq obsolete
- Keywords: places, multiple-value-setq, let
-
- sjameson@atl.ge.com writes:
- > Thank you, I understand now. I don't have a Cltl2 or draft standard handy, but
- > isn't there such a thing as multiple-value-setf which would serve exactly this
- > purpose?
-
- There is MULTIPLE-VALUE-SETQ, but this one only handles symbols as places.
- The good thing about the (VALUES ...) place is that it makes
- MULTIPLE-VALUE-SETQ obsolete. You can also write macros LETF and LETF* that
- make MULTIPLE-VALUE-BIND obsolete. You can then write
-
- (letf* (((values x y) (values (car l) (cdr l)))
- ((values q r) (floor x y)))
- (foo q r)
- )
-
- which expands into
-
- (let ((x (car l)) (y (cdr l)))
- (multiple-value-bind (q r) (floor x y)
- (foo q r)
- ) )
-
-
- Bruno Haible
- haible@ma2s2.mathematik.uni-karlsruhe.de
-
-