Canonical Way to Mask SETF?
- From: Robert Uhl <eadmund42@xxxxxxxxxxxxxxx>
- Date: Wed, 29 Jun 2005 16:42:41 -0600
I'm playing with a menu system, and would like to be able to write the
following:
(menu-item menu) -> item
(setf (menu-item menu) item)
I figured that something like this would do the trick:
(defun menu-item (menu)
(getf menu :title))
(defsetf menu-title (menu) (title)
`(setf (getf ,menu :title) ,title))
But of course it doesn't work. Any advice on how this needs to be
written?
Unfortunately there aren't too many online references which deal with
DEFSETF--at least none that I've found.
--
Robert Uhl <http://public.xdi.org/=ruhl>
It is not necessary to enquire whether a woman would like something
for dessert. The answer is yes, she would like something for dessert,
but she would like you to order it so she can pick at it with your
fork. She does not want you to call attention to this by saying, `If
you wanted a dessert, why didn't you order one?' You must understand,
she has the dessert she wants. The dessert she wants is contained
within yours.
--Merrill Marcoe, `An Insider's Guide to the American Woman'
.
- Follow-Ups:
- Re: Canonical Way to Mask SETF?
- From: Frode Vatvedt Fjeld
- Re: Canonical Way to Mask SETF?
- From: Peder O. Klingenberg
- Re: Canonical Way to Mask SETF?
- From: Kent M Pitman
- Re: Canonical Way to Mask SETF?
- From: Eric Lavigne
- Re: Canonical Way to Mask SETF?
- Prev by Date: Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
- Next by Date: Re: Screenshots of real-world Lisp apps
- Previous by thread: Socket programming using lisp
- Next by thread: Re: Canonical Way to Mask SETF?
- Index(es):
Relevant Pages
|