sequences: faster remove-nth.
parent
15c4927c5f
commit
21463894e7
|
@ -783,7 +783,7 @@ PRIVATE>
|
||||||
snip-slice surround ;
|
snip-slice surround ;
|
||||||
|
|
||||||
: remove-nth ( n seq -- seq' )
|
: remove-nth ( n seq -- seq' )
|
||||||
[ [ { } ] dip dup 1 + ] dip replace-slice ;
|
[ [ dup 1 + ] dip snip-slice ] keep append-as ;
|
||||||
|
|
||||||
: pop ( seq -- elt )
|
: pop ( seq -- elt )
|
||||||
[ length 1 - ] keep over 0 >=
|
[ length 1 - ] keep over 0 >=
|
||||||
|
|
Loading…
Reference in New Issue