> > if you want this^ to be actually defined while compilation is > > happening (i.e. in the compilation stage; see staged computing), then > > you need to use an (eval-when (expand) ...) wrapper around it. > > > Thank you for the reply! Not sure what you mean. The following code > defines `a`:
i ran with some ungrounded assumptions, and i basically explained how it works in CL, not in Guile. sorry about that! i played a little with your test now. maybe i'm stating the obvious here, but its behavior is in harmony with the hypothesis that the compilation of DEFINE (wrongly) evaluates the value in the newly updated environment (as opposed to the "parent" environment, i.e. the one before the definition has been added/set). i briefly tired to find the place where DEFINE is compiled to check this hypothesis in the code, but i couldn't find it. -- • attila lendvai • PGP: 963F 5D5F 45C7 DFCD 0A39 -- “I find television very educating: Every time somebody turns on the set, I go into the other room and read a book.” — Groucho Marx