[plt-scheme] Re: side effects in R6RS modules
On May 3, 4:53 pm, Chongkai Zhu <c... at cs.utah.edu> wrote:
> Why the dirty trick?
Maybe because it was early in the morning and I was
half asleep?
> This works:
>
> (define-syntax define+
> (lambda (x)
> (syntax-case x ()
> ((define+ name value)
> (begin (register #'name)
> #'(define name value))))))
Yes, now the script compiles and behaves as I would expect
(even in Larceny).
Still, I would be curious to know why I did not compile in PLT
in the first version and why it registered the identifiers
twice in Larceny.