 MIXIN: checksum
 
 TUPLE: checksum-state
-    { bytes-read integer } { block-size integer } { bytes byte-vector } ;
+{ bytes-read integer }
+{ block-size integer }
+{ bytes byte-vector } ;
 
 : new-checksum-state ( class -- checksum-state )
     new

    over bytes>> [ push-all ] keep
    [ dup length pick block-size>> >= ]
    [
        over block-size>> cut-slice [ >byte-array ] dip [
            over [ checksum-block ]
            [ [ ] [ block-size>> ] bi [ + ] curry change-bytes-read drop ] bi
        ] dip
    ] while
    >byte-vector

    call-next-method
    [ clone ] change-bytes ;

GENERIC: initialize-checksum-state ( checksum -- checksum-state )

GENERIC: checksum-block ( bytes checksum -- )

