Handbook
Glossary
create-primitive ( vocab word effect vm-func inputs outputs extra-word -- )
Vocabulary
bootstrap
.
image
.
primitives
Inputs
vocab
an
object
word
an
object
effect
an
object
vm-func
an
object
inputs
an
object
outputs
an
object
extra-word
an
object
Outputs
None
Definition
USING:
combinators
kernel
words
;
IN:
bootstrap.image.primitives
::
create-primitive
( vocab word effect vm-func inputs outputs extra-word -- )
word vocab
primitive-word
:>
word word vm-func
primitive-quot
:>
quot word quot effect
define-declared
word inputs
"input-classes"
set-word-prop
word outputs
"default-output-classes"
set-word-prop
word extra-word
[
( x -- )
execute-effect
]
[
drop
]
if*
;