Handbook
Glossary
define-changer ( name -- )
Factor handbook
»
The language
»
Objects
»
Low-level slot operations
Prev:
define-setter ( name -- )
Next:
define-slot-methods ( class slot-spec -- )
Vocabulary
slots
Inputs
name
an
object
Outputs
None
Definition
USING:
kernel
quotations
words
;
IN:
slots
:
define-changer
( name -- )
dup
changer-word
dup
deferred?
[
over
reader-word
1quotation
[
dip
call
]
curry
[
dip
swap
]
curry
[
over
]
prepose
rot
setter-word
1quotation
compose
( object quot -- object )
define-inline
]
[
2drop
]
if
;