Newsgroups: comp.lang.lisp
From: cyber_surfer@wildcard.demon.co.uk (Cyber Surfer)
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!europa.eng.gtefsd.com!newsxfer.itd.umich.edu!gatech!swrinde!news.dell.com!tadpole.com!uunet!news.sprintlink.net!demon!wildcard.demon.co.uk!cyber_surfer
Subject: Re: history mechanism (kbd) ??
References: <35vc52$262k@yuma.ACNS.ColoState.EDU> <35vet1$52j@tools.near.net> <363r03$q2i@nz12.rz.uni-karlsruhe.de>
Organization: The Wildcard Killer Butterfly Breeding Ground
Reply-To: cyber_surfer@wildcard.demon.co.uk
X-Newsreader: Demon Internet Simple News v1.27
Lines: 29
Date: Mon, 26 Sep 1994 13:55:29 +0000
Message-ID: <780587729snz@wildcard.demon.co.uk>
Sender: usenet@demon.co.uk

In article <363r03$q2i@nz12.rz.uni-karlsruhe.de>
           haible@ma2s2.mathematik.uni-karlsruhe.de "Bruno Haible" writes:

> > (setq form +)
> > (setf (car form) '-)
> > (eval form)
> 
> This is stone age editing. Better use iron age editing:
> 
>   #.(cons '- (rest -))

I agree that your version is better, but it might only be true for
this simple example. Now imagine a more complex example:

(max (+ 3 4) (- 3 4))

Now change the - to a *, perhaps like this:

(setf (first (third form)) '*)

or:

#.(append (butlast +) (list (cons '* (rest (third +))))

That should work, unless I've mistyped it. Anyway, that's my
point. It's not so simple.
-- 
Future generations are relying on us
It's a world we've made - Incubus	
We're living on a knife edge, looking for the ground -- Hawkwind
