Hi,
consider the following code (simple iteration
construct invented mainly to cause naming
conflict, as the function 'times' is already
defined in guile)
(define-macro (times n f)
`(let ((env (the-environment)))
(let loop ((i 0))
(if (< i ,n)
(begin
(local-eval ,f env)
(loop (1+ i))
)
)
)
)
)
the whole thing with env was made as
a workaround disallowing f to see the
i variable defined in the macro (and to
perhaps see the value that otherwise
would be shadowed)
however,
(times 20 (display i))
yields
012345678910111213141516171819
Why?
--
Regards
M.