Files
MagicSetEditor2/doc/function/random_shuffle.txt
twanvl c8fb341e1a Fixed random_int and random_real functions; added random_boolean.
Split random_select into random_select and random_select_many.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1161 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-08-24 16:08:13 +00:00

23 lines
609 B
Plaintext

Function: random_shuffle
DOC_MSE_VERSION: since 0.3.7
--Usage--
> random_shuffle(some_list)
Randomly shuffle a list, putting the elements in a different order.
Since the result is random, calling the function twice will give a different answer.
--Parameters--
! Parameter Type Description
| @input@ [[type:list]] List to shuffle.
--Examples--
> random_shuffle([1,2,3,4]) == [4,1,2,3]
> random_shuffle([1,2,3,4]) == [2,3,4,1]
--See also--
| [[fun:random_select]] Pick a single random element from a list.
| [[fun:random_select_many]] Pick multiple random elements from a list.