Atom - X - Random Value

Characters: X

Tags: random

Arity: monadic

This atom is monadic, which means it takes one argument.


Random integer from 1 to z for an integer, or choose a random value from an array.


If the argument is a list, return a random value from it. For empty lists, return 0. If z is a positive integer, return a random integer from 1 to z. If z is 0, return 0. If z is negative, a decimal, or complex, error.