Change a -rot usage to 2dip
parent
7f3b946264
commit
e6145c71c0
|
@ -343,7 +343,7 @@ PRIVATE>
|
||||||
[ (each) ] dip collect ; inline
|
[ (each) ] dip collect ; inline
|
||||||
|
|
||||||
: 2nth-unsafe ( n seq1 seq2 -- elt1 elt2 )
|
: 2nth-unsafe ( n seq1 seq2 -- elt1 elt2 )
|
||||||
[ over ] dip nth-unsafe [ nth-unsafe ] dip ; inline
|
[ over ] dip [ nth-unsafe ] 2bi@ ; inline
|
||||||
|
|
||||||
: (2each) ( seq1 seq2 quot -- n quot' )
|
: (2each) ( seq1 seq2 quot -- n quot' )
|
||||||
[ [ min-length ] 2keep ] dip
|
[ [ min-length ] 2keep ] dip
|
||||||
|
@ -538,12 +538,12 @@ M: sequence <=>
|
||||||
|
|
||||||
: sequence-hashcode-step ( oldhash newpart -- newhash )
|
: sequence-hashcode-step ( oldhash newpart -- newhash )
|
||||||
>fixnum swap [
|
>fixnum swap [
|
||||||
dup -2 fixnum-shift-fast swap 5 fixnum-shift-fast
|
[ -2 fixnum-shift-fast ] [ 5 fixnum-shift-fast ] bi
|
||||||
fixnum+fast fixnum+fast
|
fixnum+fast fixnum+fast
|
||||||
] keep fixnum-bitxor ; inline
|
] keep fixnum-bitxor ; inline
|
||||||
|
|
||||||
: sequence-hashcode ( n seq -- x )
|
: sequence-hashcode ( n seq -- x )
|
||||||
0 -rot [ hashcode* sequence-hashcode-step ] with each ; inline
|
[ 0 ] 2dip [ hashcode* sequence-hashcode-step ] with each ; inline
|
||||||
|
|
||||||
M: reversed equal? over reversed? [ sequence= ] [ 2drop f ] if ;
|
M: reversed equal? over reversed? [ sequence= ] [ 2drop f ] if ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue