Remove unecessary slot from arrow models
parent
6994e6c8ee
commit
b207482d38
|
@ -1,18 +1,17 @@
|
||||||
! Copyright (C) 2008, 2009 Slava Pestov.
|
! Copyright (C) 2008, 2009 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors models kernel ;
|
USING: accessors models kernel sequences ;
|
||||||
IN: models.arrow
|
IN: models.arrow
|
||||||
|
|
||||||
TUPLE: arrow < model model quot ;
|
TUPLE: arrow < model quot ;
|
||||||
|
|
||||||
: <arrow> ( model quot -- arrow )
|
: <arrow> ( model quot -- arrow )
|
||||||
f arrow new-model
|
f arrow new-model
|
||||||
swap >>quot
|
swap >>quot
|
||||||
over >>model
|
|
||||||
[ add-dependency ] keep ;
|
[ add-dependency ] keep ;
|
||||||
|
|
||||||
M: arrow model-changed
|
M: arrow model-changed
|
||||||
[ [ value>> ] [ quot>> ] bi* call( old -- new ) ] [ nip ] 2bi
|
[ [ value>> ] [ quot>> ] bi* call( old -- new ) ] [ nip ] 2bi
|
||||||
set-model ;
|
set-model ;
|
||||||
|
|
||||||
M: arrow model-activated [ model>> ] keep model-changed ;
|
M: arrow model-activated [ dependencies>> ] keep [ model-changed ] curry each ;
|
||||||
|
|
Loading…
Reference in New Issue