The implementation of this is here. The test client best illustrates this in action. For instance, here is a valid test case:
(define (square x) (* x x)) (check-equal? (square X) C)The essence of the implementation is just this macro:
(define-syntax (handle-id stx)
(syntax-case stx ()
[(_ . any)
(let ([str (symbol->string (syntax->datum #'any))])
(if (roman-string? str)
(with-syntax [(n (datum->syntax stx (roman->number str)))]
#'(#%datum . n))
#'(#%top . any)))]))
![[logo]](http://racket-lang.org/logo.png)
2 comments:
I(define MMMMM "that is especially delicious!")
It's a great setup for counters, too:
(do ((i i …)) …)
Post a Comment