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)
(match xs
[(list (== meta-key eq?) key val) [(list (== meta-key eq?) key val)
(unless (symbol? key) (unless (symbol? key)
(raise-argument-error 'define-meta "valid meta key" key)) (raise-argument-error 'define-meta "valid meta key" key))
(list key val)] (list key val)]
[_ (append-map loop xs)])] [(? list? xs) (append-map loop xs)]
[_ null])))) [_ null]))))
(module+ test (module+ test

@ -1 +1 @@
1540962551 1541019731

Loading…
Cancel
Save