diff --git a/scheme/httpd/surflets/surflets.scm b/scheme/httpd/surflets/surflets.scm index df59e2e..fdf680f 100644 --- a/scheme/httpd/surflets/surflets.scm +++ b/scheme/httpd/surflets/surflets.scm @@ -66,14 +66,15 @@ (define (extract-bindings bindings key) (let ((key (if (symbol? key) (symbol->string key) key))) - (filter (lambda (binding) - (equal? (car binding) key)) - bindings))) + (map cdar + (filter (lambda (binding) + (equal? (car binding) key)) + 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))))