let EXTRACT-BINDINGS return strings, not bindings
This commit is contained in:
parent
f981b2505a
commit
7c3ca073dd
|
@ -66,14 +66,15 @@
|
|||
|
||||
(define (extract-bindings bindings key)
|
||||
(let ((key (if (symbol? key) (symbol->string key) key)))
|
||||
(map cdar
|
||||
(filter (lambda (binding)
|
||||
(equal? (car binding) key))
|
||||
bindings)))
|
||||
bindings))))
|
||||
|
||||
(define (extract-single-binding bindings key)
|
||||
(let ((key-bindings (extract-bindings bindings key)))
|
||||
(if (= 1 (length key-bindings))
|
||||
(cdar key-bindings)
|
||||
(car key-bindings)
|
||||
(error "extract-one-binding: more than one or zero bindings found"
|
||||
(length key-bindings)
|
||||
key bindings))))
|
||||
|
|
Loading…
Reference in New Issue