Issue #16
resolved
The following script should print keyword and value pair and return ok but got unbound variable error.
(import (rnrs)) (define-syntax define-key (lambda (x) (define (key&name sym) (list (make-keyword sym) sym)) (define (params slots) (let loop ((slots slots) (r '())) (syntax-case slots () (() (reverse! r)) ((name . rest) (loop (cdr slots) (cons (key&name (syntax->datum #'name)) r)))))) (syntax-case x () ((k name (p ...) body ...) (with-syntax ((((keys names) ...) (datum->syntax #'k (params #'(p ...))))) #'(define (name :key names ...) (print (apply append! (list `(keys ,names) ...))) body ...)))))) (define-key test (a b c) 'ok) (test)
Comments (2)
-
reporter -
reporter - changed status to resolved
Fixed not to use unwrapped variable for let-keyword* (fixes
#16).→ <<cset 3bded9a72df3>>
- Log in to comment
This works if I modify it like this.