Handbook
Glossary
switch-model
Vocabulary
models
.
combinators
Definition
IN:
models.combinators
TUPLE:
switch-model
<
multi-model
original switcher on
;
Methods
USING:
accessors
kernel
models
models.combinators
;
M:
switch-model
(model-changed)
2dup
switcher>>
=
[
[
value>>
]
dip
over
switch
=
[
nip
[
original>>
]
keep
f
>>on
model-changed
]
[
t
>>on
set-model
]
if
]
[
dup
on>>
[
2drop
]
[
[
value>>
]
dip
over
[
set-model
]
[
2drop
]
if
]
if
]
if
;
USING:
accessors
kernel
models
models.combinators
;
M:
switch-model
model-activated
[
original>>
]
keep
model-changed
;