Handbook
Glossary
predicate-class
Factor handbook
»
The language
»
Objects
»
Classes
»
Predicate classes
Prev:
define-predicate-class ( class superclass definition -- )
Next:
predicate-class? ( object -- ? )
Vocabulary
classes
.
predicate
Class description
The class of predicate class words, defined by
PREDICATE:
and documented in
Predicate classes
.
See also
define-predicate-class
,
PREDICATE:
Definition
USING:
classes
kernel
words
;
IN:
classes.predicate
PREDICATE:
predicate-class
<
class
"metaclass"
word-prop
predicate-class
eq?
;
Methods
USING:
classes
classes.algebra
classes.algebra.private
classes.predicate
;
M:
predicate-class
(classes-intersect?)
superclass-of
classes-intersect?
;
USING:
classes
classes.algebra.private
classes.predicate
;
M:
predicate-class
(flatten-class)
superclass-of
(flatten-class)
;
USING:
classes.predicate
definitions.icons
kernel
;
M:
predicate-class
definition-icon
drop
"class-predicate-word"
definition-icon-path
;
USING:
classes
classes.predicate
combinators
kernel
words
;
M:
predicate-class
instance?
2dup
superclass-of
instance?
[
"predicate-definition"
word-prop
( object -- ? )
call-effect
]
[
2drop
f
]
if
;
USING:
classes
classes.predicate
classes.predicate.private
kernel
words
;
M:
predicate-class
predicate-quot
[
superclass-of
predicate-def
]
[
"predicate-definition"
word-prop
]
bi
[
[
[
dup
]
]
dip
compose
]
dip
[
[
drop
f
]
if
]
curry
compose
;
USING:
classes.predicate
classes.private
kernel
;
M:
predicate-class
rank-class
drop
2
;
USING:
classes.predicate
classes.private
generic
kernel
words
;
M:
predicate-class
reset-class
[
M\
predicate-class
reset-class
(call-next-method)
]
[
"predicate-definition"
remove-word-prop
]
bi
;
USING:
classes
classes.predicate
kernel
prettyprint.backend
prettyprint.sections
see.private
vocabs.prettyprint
words
;
M:
predicate-class
see-class*
<colon
\
PREDICATE:
pprint-word
dup
pprint-word
"<"
text
dup
superclass-of
pprint-word
<block
"predicate-definition"
word-prop
pprint-elements
pprint-;
block>
block>
;