concept Random in category elm

appears as: Rdom, Random
Elm in Action

This is an excerpt from Manning's book Elm in Action.

In Elm, we start with a Random.Generator, which specifies the type of value we want to randomly generate. For example, the Random.int function takes a lower bound and an upper bound, and returns a Random.Generator that generates a random Int between those bounds.

We also need to add the Random module to the end of our imports:

import Random

This won’t quite compile yet, because although we’ve added import Random, the Random module is not among the standard modules that were installed when we ran elm init in chapter 2. For import Random to work, we first need to install the package that contains the Random module.