Functions List


Randomness


random-range

The function random-range generates a pseudo-random number within a given interval, excluding the endpoint, i.e., in the interval [a,b[.

Parameters:

a – Interval start
b – Interval end (excluded)

Syntax:

(random-range a b)

Example:

> (random-range 10 20)
15

> (random-range 0.4 1.2)
0.4772932228060873
Top