instance-check-quot ( obj -- quot ) - Factor Documentation

instance-check-quot ( obj -- quot )


Vocabulary
slots

Inputs
obj an object


Outputs
quot an object


Definition
IN: slots

GENERIC: instance-check-quot ( obj -- quot )


Methods
USING: classes combinators generic kernel slots words ;

M: class instance-check-quot
{
{ [ dup object bootstrap-word eq? ] [ drop [ ] ] }
{ [ dup "coercer" word-prop ] [ "coercer" word-prop ] }
[ M\ class instance-check-quot (call-next-method) ]
} cond ;


USING: classes kernel slots ;

M: object instance-check-quot
[ predicate-def [ dup ] prepose ] keep
[ bad-slot-value ] curry [ unless ] curry compose ;

AltStyle によって変換されたページ (->オリジナル) /