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