Atom - X - Random Value

Characters: X

Tags: random

Arity: monadic

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

Functionality

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

Details

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.