diff --git a/lib/scheme/extras.scm b/lib/scheme/extras.scm index 05717b4b..2e168122 100644 --- a/lib/scheme/extras.scm +++ b/lib/scheme/extras.scm @@ -34,8 +34,10 @@ (define exact inexact->exact) (define inexact exact->inexact) -(define (boolean=? x y) (eq? x y)) -(define (symbol=? x y) (eq? x y)) +(define (boolean=? x y . o) + (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))) (define call/cc call-with-current-continuation) diff --git a/tests/r7rs-tests.scm b/tests/r7rs-tests.scm index 4f865056..f0fc7678 100644 --- a/tests/r7rs-tests.scm +++ b/tests/r7rs-tests.scm @@ -801,6 +801,8 @@ (test #t (boolean=? #t #t)) (test #t (boolean=? #f #f)) (test #f (boolean=? #t #f)) +(test #t (boolean=? #f #f #f)) +(test #f (boolean=? #t #t #f)) (test-end) @@ -916,6 +918,8 @@ (test #t (symbol=? 'a 'a)) (test #f (symbol=? 'a 'A)) +(test #t (symbol=? 'a 'a 'a)) +(test #f (symbol=? 'a 'a 'A)) (test "flying-fish" (symbol->string 'flying-fish))