yes :-) i will keep it in mind. It is a bit like a let* i tends to
forget it sometimes.

On Fri, Aug 4, 2023 at 10:31 AM Jean Abou Samra <j...@abou-samra.fr> wrote:
>
> Le vendredi 04 août 2023 à 10:23 +0200, Damien Mattei a écrit :
>
> i know what disturb me in this error, it is because the order of
> definitions has effect but i always learn (was it right?) that in
> scheme the order of definitions should have no effect on the resulting
> evaluations.
>
>
>
> Not really, you cannot do
>
> (define b (1+ a))
> (define a 5)
>
> either. You *can* do
>
> (define (b) (1+ a))
> (define a 5)
>
> but that's because the definition of b does not use the binding for a, only 
> capture it in a lambda abstraction. The reason you cannot do
>
> (define b (mac 1))
> (define-syntax-rule (mac x) x)
>
> is that the (mac 1) expression used in the binding of b is using the macro 
> (at expand time), just like in my first example it was using the variable a 
> (at runtime).
>
>
>

Reply via email to