 
 M: sequence shorten 2dup length < [ set-length ] [ 2drop ] if ;
 
-: empty? ( seq -- ? ) length zero? ; inline
+: empty? ( seq -- ? ) length 0 = ; inline
 
 : if-empty ( seq quot1 quot2 -- )
     [ dup empty? ] [ [ drop ] prepose ] [ ] tri* if ; inline

    [ -rot 2nth-unsafe <=> ] [ [ length ] compare ] if* ;

: sequence= ( seq1 seq2 -- ? )
    2dup [ length ] bi@ number=
    [ mismatch not ] [ 2drop f ] if ; inline

: sequence-hashcode-step ( oldhash newpart -- newhash )

PRIVATE>

: open-slice ( shift from seq -- )
    pick 0 = [
        3drop
    ] [
        pick over length + over >r >r
