 
 M: summed length seqs>> longest length ;
 
-M: summed modified-nth ( n seq -- elt )
+M: summed modified-nth
     seqs>> [ ?nth [ + ] when* ] with 0 swap reduce ;
 
-M: summed modified-set-nth ( elt n seq -- ) immutable ;
+M: summed modified-set-nth immutable ;
 
-M: summed set-length ( n seq -- )
+M: summed set-length
     seqs>> [ set-length ] with each ;
 
-M: summed virtual-exemplar ( summed -- seq )
+M: summed virtual-exemplar
     seqs>> ?first ;
 
 : <2summed> ( seq seq -- summed-seq ) 2array <summed> ;

: seq-offset ( seq n -- new-seq )
    dupd <offset> swap like ;

M: offset modified-nth ( n seq -- elt )
    [ seq>> nth ] [ n>> + ] bi ;

M:: offset modified-set-nth ( elt n seq -- )
    elt seq n>> - n seq seq>> set-nth ;

TUPLE: summed < modified seqs ;


: scale ( seq c -- new-seq )
    dupd <scaled> swap like ;

M: scaled modified-nth
    [ seq>> nth ] [ c>> * ] bi ;

M: scaled modified-set-nth
    ! don't set c to 0!
    [ nip c>> / ] [ seq>> set-nth ] 2bi ;

TUPLE: offset < 1modified n ;

