[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fwd: Re: definition in expression context, where definitions are not all
Fwd: Re: definition in expression context, where definitions are not allowed
Sun, 11 Oct 2015 19:14:54 +0200
KMail/4.14.8 (Linux/3.14.14-gentoo; KDE/4.14.8; x86_64; ; )
Thank you for answering!
May I send my reply to guile-devel?
Am Sonntag, 11. Oktober 2015, 09:58:59 schrieb David Kastrup:
> > Or am I missing something else which is enabled by this limitation?
> A function defined with `define' may call a function defined in a
> _following_ `define'. How do you make that work when a statement
> in-between can already call the first function?
So this is a guarantee that all defines in a block of defines can call
I now looked it up in r7rs small.
> Definitions can occur at the beginning of a body (that
> is, the body of a lambda, let, let*, letrec, letrec*,
> let-values, let*-values, let-syntax, letrec-syntax,
> parameterize, guard, or case-lambda).
> An expanded body containing internal definitions can al-
> ways be converted into a completely equivalent letrec*
So essentially this is just explicit scoping, as with let. And let
proved to me that it works better than just assigning anywhere
(because it doesn’t have a large overhead).
So I think what threw me off is mainly the error message:
> definition in expression context, where definitions are not allowed
This does not tell me how I can do what I intended to. “all
definitions must be at the beginning of the body. You can for example
create a new scope with let ().”
5.3.2, page 26
Description: This is a digitally signed message part.
|[Prev in Thread]
||[Next in Thread]|
- Fwd: Re: definition in expression context, where definitions are not allowed,
Arne Babenhauserheide <=