std-randomize | ![]() ![]() |
(std-randomize <list>)
Shuffles a list randomly. Returns a copy of the randomized list consisting
of the same, =
but not EQ
, elements of the original list in random order.
Note
This operation is usually quite costly in plain AutoLISP, especially on large lists.
For VL there exists therefore an improved version (std-%randomize [random-state])
from FILEEXT.FAS
(std-randomize '(0 1 2 3 4))
e.g. might return: => (3 1 4 0 2)
or: => (4 1 2 0 3)
list: any list (not proper lists also?)
Returns a copy of the list with the same elements but in random order.
None.
(std-require 'STDLIST)
Defined in STDLIST and extended for VL in FILEEXT.FAS