Handbook
Glossary
define-singleton-class ( word -- )
Factor handbook
»
The language
»
Objects
»
Classes
»
Singleton classes
Prev:
SINGLETONS:
Next:
singleton-class? ( object -- ? )
Vocabulary
classes
.
singleton
Inputs
word
a new word
Outputs
None
Word description
Defines a singleton class. This is the run-time equivalent of
SINGLETON:
.
See also
SINGLETON:
Definition
USING:
classes.predicate
classes.singleton.private
kernel
words
;
IN:
classes.singleton
:
define-singleton-class
( word -- )
\
word
over
singleton-predicate-quot
define-predicate-class
;