Path: utzoo!mnetor!uunet!husc6!bloom-beacon!oberon!cit-vax!ucla-cs!pierce From: pierce@CS.UCLA.EDU Newsgroups: comp.lang.scheme Subject: Re : set in Scheme Message-ID: <12073@shemp.CS.UCLA.EDU> Date: 7 May 88 17:40:57 GMT Sender: news@CS.UCLA.EDU Reply-To: pierce@CS.UCLA.EDU () Distribution: na Organization: UCLA Computer Science Department Lines: 37 Sorry about the last message, I wrote the set macro down a little too fast and it clearly won't work as intended. I meant to say something like this: (macro set (lambda (e) (list 'eval (list 'list ''set! (list 'eval (list 'quote (cadr e))) (list 'quote (caddr e)))))) Then if you (define a 's) (define s 'any) (define b 'r) the effect of (set a b) should be to assign the value r to s. So far so good. But what about this function? (define foo (lambda (x y) (set x y))) If we (define s 'any) then the effect of (foo a b) is the same as above. Judging by my last posting, this may not be perfect either, but at least it's a lot closer. I'd be interested in seeing a shorter or better solution. Thanks for your patience. -- Brad Pierce