home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.lisp
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!spool.mu.edu!sdd.hp.com!saimiri.primate.wisc.edu!usenet.coe.montana.edu!rpi!news.ans.net!cmcl2!IMAGE.CS.NYU.EDU!marcoxa
- From: marcoxa@IMAGE.CS.NYU.EDU (Marco Antoniotti)
- Subject: setf methods for structure accessors used as parameters
- Message-ID: <9212222057.AA11609@IMAGE.CS.NYU.EDU>
- Sender: daemon@cmcl2.nyu.edu (Mr Background)
- Organization: New York University
- Distribution: comp.lang.lisp,comp.lang.clos
- Date: Tue, 22 Dec 1992 10:57:32 GMT
- Lines: 31
-
- Hello there,
-
- I am writing some code (priority queues) that uses a :key argument to
- extract information from some structure. The value passed as a :key
- argument is always funcalled within the code. At a certain point I
- need to actually 'setf' the structure slot 'keyed' by the :key value.
- I.e. I have code that looks like
-
- (defun maximize (x &key (key an-x-accessor))
-
- ...
-
- (funcall an-x-accessor x)
- )
-
- and I want to be able to do something like
-
-
- (defun do-maximize (x &key (key an-x-accessor))
-
- ...
-
- (setf (an-x-accessor x) somevalue)
- )
-
- I checked CLtL2, but I couldn't come up with anything reasonable. I
- have a hunch that it is not possible.
-
- Any idea?
-
- Marco
-