You want a random number from a given range. For example, you wish to randomly select one element from an array, simulate rolling a die in a game of chance, or generate a random password.
In the example, we want to limit the range to 25 to 75, so we add 25 to the result of the random function. This means we really want a random number between 0 and 50, so we give the random function the argument 51 (since the generated number is always from 0 to n-1).
The canonical application for this kind of number generation is the random selection of an element from a vector:
Another common example is generating a random password. For this example, we will make use of SRFI 14 (Character Set Library) and
SRFI 42 (List Comprehensions):