Simplify quoting and unquoting in auto-hash-ref/explicit.
This commit is contained in:
parent
f6946d94ad
commit
fa015870d0
1 changed files with 3 additions and 3 deletions
|
@ -51,9 +51,9 @@
|
||||||
|
|
||||||
(define-syntax (auto-hash-ref/explicit stx)
|
(define-syntax (auto-hash-ref/explicit stx)
|
||||||
(syntax-parse stx
|
(syntax-parse stx
|
||||||
[(_ (ht:id xs:id ...) body:expr)
|
[(_ (ht:id keys:id ...) body:expr)
|
||||||
#`(let #,(for/list ([x (syntax->list #'(xs ...))])
|
#`(let #,(for/list ([key (syntax->list #'(keys ...))])
|
||||||
#`[#,x (hash-ref ht '#,x)])
|
`[,key (hash-ref ,#'ht ',key)])
|
||||||
body)]))
|
body)]))
|
||||||
|
|
||||||
(module+ test
|
(module+ test
|
||||||
|
|
Loading…
Reference in a new issue