Handbook
Glossary
(define-variable) ( word getter setter -- )
Vocabulary
variables
Inputs
word
an
object
getter
an
object
setter
an
object
Outputs
None
Definition
USING:
accessors
kernel
sequences
words
;
IN:
variables
:
(define-variable)
( word getter setter -- )
[
( -- value )
define-inline
]
[
[
[
name>>
"set: "
prepend
<uninterned-word>
]
[
over
"variable-setter"
set-word-prop
]
bi
]
dip
( value -- )
define-inline
]
bi-curry*
bi
;