[plt-scheme] define-syntax help
Perhaps I'm missing something. Why not make these functions?
N.
----- Original Message ----
From: "support at taxupdate.com" <support at taxupdate.com>
Given the following:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define *field-hash* (make-hash-table))
(define (make-key mod sym)
(string->symbol (format "~a.~a" mod sym)))
(define-syntax (register stx)
(syntax-case stx ()
((_ sym val mod)
#`(hash-table-put! *field-hash* (make-key 'mod 'sym) val))))
(reqister you "joe" main)
(register you "sue" aux)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
...
____________________________________________________________________________________
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.
http://answers.yahoo.com/dir/?link=list&sid=396545367