pull/181/head
Matthew Butterick 6 years ago
parent 419dc32a3b
commit 75ec407890

@ -7,13 +7,11 @@
(apply hasheq (apply hasheq
(let loop ([x ((if (syntax? x) syntax->datum values) x)]) (let loop ([x ((if (syntax? x) syntax->datum values) x)])
(match x (match x
[(? list? xs) [(list (== meta-key eq?) key val)
(match xs (unless (symbol? key)
[(list (== meta-key eq?) key val) (raise-argument-error 'define-meta "valid meta key" key))
(unless (symbol? key) (list key val)]
(raise-argument-error 'define-meta "valid meta key" key)) [(? list? xs) (append-map loop xs)]
(list key val)]
[_ (append-map loop xs)])]
[_ null])))) [_ null]))))
(module+ test (module+ test

@ -1 +1 @@
1540962551 1541019731

Loading…
Cancel
Save