[gambit-list] Macro defined in .gambcini.scm
Kartik Saranathan
ksaranat at gmail.com
Sun Jun 9 16:27:13 EDT 2013
I want to make available a macro in the REPL. The macro is also used by a
utility function which I also want to use in the repl
;; ~/.gambcini.scm
(define first car)
(define-macro (mac . args)
(first args))
(define (foo . args)
(mac args))
The macro is purposely unquoted since it is meant to change structure of
its argument
When I run gsi I get
*** ERROR IN ##raise-unbound-global-exception -- Unbound variable: first
I think this happens because the macro is expanded before first is
defined. How do I avoid this problem and still have foo and mac available
in the repl?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20130609/75e5d20a/attachment.htm>
More information about the Gambit-list
mailing list