Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!apple!bloom-beacon!mit-eddie!mit-amt!mt From: mt@mit-amt.MEDIA.MIT.EDU (Michael Travers) Newsgroups: comp.lang.lisp Subject: Re: possibly a trivia question... Message-ID: <162@mit-amt.MEDIA.MIT.EDU> Date: 18 Jul 89 02:51:07 GMT References: <34825@bu-cs.BU.EDU> Reply-To: mt@media-lab.media.mit.edu (Michael Travers) Organization: MIT Media Lab, Cambridge MA Lines: 27 In article <34825@bu-cs.BU.EDU> bzs@bu-cs.BU.EDU (Barry Shein) writes: > >In Common Lisp, given: > > (setf (get 'foo 'bar) 'goo) > >what should: > > (prog (foo) (get 'foo 'bar)) > >return (prog could be (lambda (foo)..) or (let (foo)...), I assume the >answer should be basically the same)? I would have thought so too, but it turns out the prog is not like progn in that it doesn't return the value of its last form. Prog is defined in terms of tagbody (see ClTL p. 133) and tagbody returns nil by default (p. 130). Binding a variable never affects its property list, so that's irrelevant. >One implementation I tried returned 'goo and the other NIL. The first one is apparently in error. -- Michael Travers / MIT Media Lab / mt@media-lab.media.mit.edu