random: use nths-unsafe in sample.

db4
John Benediktsson 2013-04-06 14:20:42 -07:00
parent f13cbb3c4a
commit 4af98fa568
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ ERROR: too-many-samples seq n ;
: sample ( seq n -- seq' )
2dup [ length ] dip < [ too-many-samples ] when
[ [ length iota >array ] dip [ randomize-n-last ] keep tail-slice* ]
[ drop ] 2bi nths ;
[ drop ] 2bi nths-unsafe ;
: delete-random ( seq -- elt )
[ length random-integer ] keep