i do not understand well what you want to mean with those example.
For me define-once does not seems to be a solution, it act as define too
much ,does not set! variable if already exist and can not use to set it
again because, as define it is forbidden twice in the same block for the
same variable
Damien Mattei schreef op wo 22-09-2021 om 09:52 [+0200]:
> i do not understand well what you want to mean with those example.
> For me define-once does not seems to be a solution, it act as define too
> much
> ,does not set! variable if already exist and can not use to set it again
> because,
>
On 21.09.2021 21:03, Maxime Devos wrote:
>
> (define (foo2 set?)
> (define x) ; define an (undefined or unbound, not sure about terminology)
> variable
> (if set?
> (let ()
> (set! x 2) ; change the value of x
> (display "x=")
> (display x)
> (newline))
>