Handbook
Glossary
fold-model
Vocabulary
models
.
combinators
Definition
IN:
models.combinators
TUPLE:
fold-model
<
multi-model
quot base values
;
Methods
USING:
accessors
combinators
kernel
models
models.combinators
models.combinators.private
sequences
;
M:
fold-model
(model-changed)
2dup
base>>
=
[
[
[
value>>
]
[
[
values>>
]
[
quot>>
]
bi
]
bi*
swapd
reduce*
]
keep
set-model
]
[
[
[
value>>
]
[
values>>
]
bi*
push
]
[
[
[
value>>
]
[
[
value>>
]
[
quot>>
]
bi
]
bi*
( val oldval -- newval )
call-effect
]
keep
set-model
]
2bi
]
if
;
USING:
kernel
models
models.combinators
;
M:
fold-model
model-activated
drop
;