From: Chris Hanson <org/chris-hanson/cph>
Date: Tue, 1 May 2018 06:48:06 +0000 (-0700)
Subject: Generalize boolean=? to support multiple arguments.
X-Git-Tag: mit-scheme-pucked-x11-0.3.1~7^2~87
X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=78921fbc27deb754fb92630a88c26846678c37b7;p=mit-scheme.git

Generalize boolean=? to support multiple arguments.
---

diff --git a/src/runtime/boole.scm b/src/runtime/boole.scm
index 662259928..688b872fb 100644
--- a/src/runtime/boole.scm
+++ b/src/runtime/boole.scm
@@ -39,8 +39,12 @@ USA.
   (or (eq? object #f)
       (eq? object #t)))
 
-(define (boolean=? x y)
-  (if x y (not y)))
+;; R7RS says that the args to this procedure must satisfy boolean?.
+;; We relax that to allow any object.
+(define (boolean=? b1 b2 . bs)
+  (and (if b1 b2 (not b2))
+       (every (if b1 (lambda (b) b) not)
+	      bs)))
 
 (define (boolean/or . arguments)
   (let loop ((arguments arguments))