assert types in boolean=? and symbol=? (fixes issue #579)

This commit is contained in:
Alex Shinn 2019-10-06 22:29:58 +08:00
parent 544eaa79c7
commit 58e10b2a7d

View file

@ -35,9 +35,13 @@
(define inexact exact->inexact) (define inexact exact->inexact)
(define (boolean=? x y . o) (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) (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) (define call/cc call-with-current-continuation)