From the Decker reference manual, Built-In Functions, footnote 6:
The behavior of random[x y]
depends on the type of x
and whether or not y
is provided:
- if
x
is a number, treat it as if it wererange x
. - if
x
is anything else, choose random elements from it. - if
y
is missing, the result will be a single random element. - if
y
is positive, choose a list ofy
random elements. - if
y
is negative, choose a list of|y|
random elements without repeats, provided sufficient elements iny
.