Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: RANDOM's & PICK's args

From: tomc:darkwing:uoregon at: 19-Jan-2002 16:54

If I am understanding you.. you should only need to seed RANDOM once, anywhere before you use it, then yes you could could mess with your source array to avoid duplication ,and you could check for dups each time you added a string... but you also might get lucky... and if not your target array is smaller so it's better to tweak that rebol[] random/seed now ;... set-size: 6 set: make block! set-size balls: copy [] for i 1 50 1 [append/only balls rejoin["String " i]] loop set-size[append/only set pick balls random 50] set: unique set while[(length? set) < set-size][ append/only set pick balls random 50 set: unique set ] On Sat, 19 Jan 2002, Donald Dalley wrote: