Bizarre, I was for some reason very convinced that begin defined its own scope!
I guess I usually called it in the positions in which it becomes an expression
as opposed to being used in its special form with splicing. The macro is
working like a charm now.
Thanks, I thought the solution would
Are you sure that `begin` doesn't suffice for your needs? It has a somewhat
unintuitive scoping behavior. From the docs [1]
The begin form is special at the top level, at module level, or as a body
after only internal definitions. In those positions, instead of forming an
expression, the content
Hi Sam,
I'm a little unclear on your intended use case since (begin ...) does
splice defines, for instance:
(define (add-something x)
(begin
(define one 1)
(define two 2))
(+ x one two))
;;
Welcome to DrRacket, version 6.9 [3m].
Language: racket/base, with debugging; memory
3 matches
Mail list logo