     dup dup tuple-layout echelon>>
     [ tuple-instance? ] 2curry define-predicate ;
 
-: superclass-size ( class -- n )
-    superclasses but-last [ "slots" word-prop length ] sigma ;
+: class-size ( class -- n )
+    superclasses [ "slots" word-prop length ] sigma ;
 
 : (instance-check-quot) ( class -- quot )
     [

    } cleave ;

: define-new-tuple-class ( class superclass slots -- )
    make-slots
    [ drop f f tuple-class define-class ]
    [ nip "slots" set-word-prop ]
    [ 2drop update-classes ]

: check-superclass ( superclass -- )
    dup valid-superclass? [ bad-superclass ] unless drop ;

GENERIC# (define-tuple-class) 2 ( class superclass slots -- )

PRIVATE>

: define-tuple-class ( class superclass slots -- )
    over check-superclass
    make-slots over class-size 2 + finalize-slots
    (define-tuple-class) ;

M: word (define-tuple-class)
    define-new-tuple-class ;

M: tuple-class (define-tuple-class)
    3dup tuple-class-unchanged?
    [ 3drop ] [ redefine-tuple-class ] if ;

