curry-effect ( effect -- effect' )


Vocabulary
effects

Definition
USING: accessors arrays kernel math sequences ;

IN: effects

: curry-effect ( effect -- effect' )
[ in>> length ] [ out>> length ] [ terminated?>> ] tri
pick 0 = [ [ 1 + ] dip ] [ [ 1 - ] 2dip ] if
[ [ "x" <array> ] bi@ ] dip <terminated-effect> ;