diff --git a/extra/ui/frp/signals/signals.factor b/extra/ui/frp/signals/signals.factor index 9813165b1d..650acb37c8 100644 --- a/extra/ui/frp/signals/signals.factor +++ b/extra/ui/frp/signals/signals.factor @@ -18,11 +18,11 @@ M: filter-model (model-changed) [ value>> ] dip 2dup quot>> call( a -- ? ) [ set-model ] [ 2drop ] if ; : ( model quot -- filter-signal ) [ 1array filter-model ] dip >>quot ; -TUPLE: fold-model < multi-model oldval quot ; -M: fold-model (model-changed) [ [ value>> ] [ [ oldval>> ] [ quot>> ] bi ] bi* +TUPLE: fold-model < multi-model quot ; +M: fold-model (model-changed) [ [ value>> ] [ [ value>> ] [ quot>> ] bi ] bi* call( val oldval -- newval ) ] keep set-model ; : ( model oldval quot -- signal ) rot 1array fold-model swap >>quot - swap [ >>oldval ] [ >>value ] bi ; + swap >>value ; TUPLE: updater-model < multi-model values updates ; M: updater-model (model-changed) tuck updates>> =