diff --git a/lib/scheme/extras.scm b/lib/scheme/extras.scm index fbbf6cba..4ef1620a 100644 --- a/lib/scheme/extras.scm +++ b/lib/scheme/extras.scm @@ -35,9 +35,13 @@ (define inexact exact->inexact) (define (boolean=? x y . o) - (and (eq? x y) (if (pair? o) (apply boolean=? y o) #t))) + (if (not (boolean? x)) + (error "not a boolean" x) + (and (eq? x y) (if (pair? o) (apply boolean=? y o) #t)))) (define (symbol=? x y . o) - (and (eq? x y) (if (pair? o) (apply symbol=? y o) #t))) + (if (not (symbol? x)) + (error "not a symbol" x) + (and (eq? x y) (if (pair? o) (apply symbol=? y o) #t)))) (define call/cc call-with-current-continuation)