let EXTRACT-BINDINGS return strings, not bindings

This commit is contained in:
interp 2002-10-03 11:58:27 +00:00
parent f981b2505a
commit 7c3ca073dd
1 changed files with 5 additions and 4 deletions

View File

@ -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))))