This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Bad define placement?
Richard Frith-Macdonald <richard@brainstorm.co.uk> writes:
> On 27 Aug 1999 16:07:45 +0200, mdj@mdj-pc.nada.kth.se wrote:
> > >From R5RS:
> >
> > "Definitions may occur at the beginning of a <body> (that is, the body
> > of a lambda, let, let*, letrec, let-syntax, or letrec-syntax expression
> > or that of a definition of an appropriate form)."
>
> Sorry if this is a foolish question but ...
No foolish question.
> Does that include the beginning of a (begin...) too?
No.
> If I remember correctly, a begin is supposed to be rewritten internally by
> the system as a letrec,
No, a begin is not normally rewritten.
> so I'd have thought that a define should be legitimate there and
> possibly in other places as well. Is there a definative reference
> document on the web that I should be looking at?
The definitive reference on Scheme is R5RS which you can find at
http://www.cs.indiana.edu/scheme-repository/doc.standards.html
The definitive part of the definitive R5RS is the formal syntax and
semantics at the end of the document. :)