Cleaner version of randomize.

db4
John Benediktsson 2008-09-25 21:19:28 -07:00
parent 7273094ffe
commit c6d8362d97
1 changed files with 1 additions and 1 deletions

View File

@ -166,5 +166,5 @@ PRIVATE>
USE: math.ranges
USE: random
: randomize ( seq -- seq' )
dup length 1 swap [a,b) <reversed> [ dup random pick exchange ] each ;
dup length 1 (a,b] [ dup random pick exchange ] each ;