Handbook
Glossary
switch-models ( model1 model2 -- model' )
Vocabulary
models
.
combinators
Inputs
model1
a
model
model2
a
model
Outputs
model'
a
model
Word description
Creates a model that starts with the behavior of model2 and switches to the behavior of model1 on its update
Definition
USING:
accessors
arrays
kernel
;
IN:
models.combinators
:
switch-models
( model1 model2 -- model' )
swap
[
2array
switch-model
<multi-model>
]
2keep
[
[
value>>
>>value
]
[
>>original
]
bi
]
[
>>switcher
]
bi*
;