Handbook
Glossary
singleton-class? ( object -- ? )
Factor handbook
»
The language
»
Objects
»
Classes
»
Singleton classes
Prev:
define-singleton-class ( word -- )
Next:
singleton-class
Vocabulary
classes
.
singleton
Inputs and outputs
object
an
object
?
a
boolean
Word description
Tests if the object is an instance of the
singleton-class
class.
Definition
USING:
classes.predicate
classes.singleton.private
kernel
sequences
words
;
IN:
classes.singleton
:
singleton-class?
( object -- ? )
dup
predicate-class?
[
[
"predicate-definition"
word-prop
]
[
singleton-predicate-quot
]
bi
sequence=
]
[
drop
f
]
if
;