remove a couple unused words

db4
Doug Coleman 2008-10-15 12:04:32 -05:00
parent d0ebf175b4
commit 4b0b19e8e7
1 changed files with 3 additions and 15 deletions

View File

@ -4,7 +4,8 @@
USING: combinators.lib kernel sequences math namespaces make USING: combinators.lib kernel sequences math namespaces make
assocs random sequences.private shuffle math.functions arrays assocs random sequences.private shuffle math.functions arrays
math.parser math.private sorting strings ascii macros assocs.lib math.parser math.private sorting strings ascii macros assocs.lib
quotations hashtables math.order locals generalizations ; quotations hashtables math.order locals generalizations
math.ranges random ;
IN: sequences.lib IN: sequences.lib
: each-withn ( seq quot n -- ) nwith each ; inline : each-withn ( seq quot n -- ) nwith each ; inline
@ -131,11 +132,6 @@ PRIVATE>
: power-set ( seq -- subsets ) : power-set ( seq -- subsets )
2 over length exact-number-strings swap [ switches ] curry map ; 2 over length exact-number-strings swap [ switches ] curry map ;
USE: continuations
: ?subseq ( from to seq -- subseq )
>r >r 0 max r> r>
[ length tuck min >r min r> ] keep subseq ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<PRIVATE <PRIVATE
@ -149,18 +145,10 @@ PRIVATE>
: attempt-each ( seq quot -- result ) : attempt-each ( seq quot -- result )
(each) iterate-prep (attempt-each-integer) ; inline (each) iterate-prep (attempt-each-integer) ; inline
: ?nth* ( n seq -- elt/f ? )
2dup bounds-check? [ nth-unsafe t ] [ 2drop f f ] if ; flushable
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
USE: math.ranges
USE: random
: randomize ( seq -- seq' ) : randomize ( seq -- seq' )
dup length 1 (a,b] [ dup random pick exchange ] each ; dup length 1 (a,b] [ dup random pick exchange ] each ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! : enumerate ( seq -- seq' ) <enum> >alist ;
: enumerate ( seq -- seq' )
<enum> >alist ;