Handbook
Glossary
define-typed-variable ( word type -- )
Vocabulary
variables
Inputs
word
an
object
type
an
object
Outputs
None
Definition
USING:
combinators
kernel
namespaces
slots
words
;
IN:
variables
:
define-typed-variable
( word type -- )
dupd
{
[
[
[variable-getter]
]
dip
[typed-getter]
]
[
[
[variable-setter]
]
dip
[typed-setter]
]
[
"variable-type"
set-word-prop
]
[
initial-value
drop
swap
set-global
]
}
2cleave
(define-variable)
;