Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!emo From: emo@iuvax.cs.indiana.edu (Eric Ost) Newsgroups: comp.lang.scheme Subject: Re: where define is legal Message-ID: <19891@iuvax.cs.indiana.edu> Date: 21 Apr 89 02:50:39 GMT References: <8904201554.AA13117@spt.entity.com> Reply-To: emo@iuvax.cs.indiana.edu (Eric Ost) Organization: Indiana University, Bloomington Lines: 23 >> Offhand, the following definition seems bogus: >>> >>> (define (foo bool) >>> (if bool >>> (define (result) #true) >>> (define (result) #false)) >>> (result)) >>> >>> And indeed, when I try to run this in MacScheme, I get an error message. I suspect you get an unbound global variable error, correct? What about the following, slightly different definition for "foo"? (define (foo bool) (define (result) (if bool #t #f)) (result)) eric