From 93c2a5797b899498f1ae8c6836570011ace22386 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 25 Jun 1997 03:52:41 +0000 Subject: [PATCH] Allow INSTANCE-PREDICATE to take a specializer as an argument rather than just a class. --- v7/src/sos/instance.scm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/v7/src/sos/instance.scm b/v7/src/sos/instance.scm index 7d1ae916d..3dc43bdb3 100644 --- a/v7/src/sos/instance.scm +++ b/v7/src/sos/instance.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: instance.scm,v 1.5 1997/06/16 08:58:33 cph Exp $ +;;; $Id: instance.scm,v 1.6 1997/06/25 03:52:41 cph Exp $ ;;; ;;; Copyright (c) 1995-97 Massachusetts Institute of Technology ;;; @@ -268,18 +268,18 @@ (define (instance-class instance) (dispatch-tag-contents (tagged-vector-tag instance))) -(define (instance-predicate class) - (if (not (class? class)) - (error:wrong-type-argument class "class" 'INSTANCE-PREDICATE)) +(define (instance-predicate specializer) + (if (not (specializer? specializer)) + (error:wrong-type-argument specializer "specializer" + 'INSTANCE-PREDICATE)) (let ((predicate (make-generic-procedure 1))) (let ((add (lambda (c v) (add-method predicate (make-method (list c) (lambda (object) object v)))))) (add #f) - (add class #t)) + (add specializer #t)) predicate)) -(define (instance-of? object class) - (and (subclass? (object-class object) class) - #t)) \ No newline at end of file +(define (instance-of? object specializer) + (subclass? (object-class object) specializer)) \ No newline at end of file -- 2.25.1