die package:real-dice
This module provides the DieGen data type and functions for using Dice
to generate random positive integers via balanced tables randomized by
the RealDice data or custom integer tables
Stores a balanced table of random integers and an index pointing at
the next value to return
Creates a new DieGen with the given index and the default Int table
Examples
>>> mkDieGen 143
{143, rdIntsPrime}
Creates a new DieGen with the given index and Int table
Defaults to the RealDice balanced table of random integers if an empty
list is given
Examples
>>> mkDieGenCustom 143 [1, 0, 4, 3, 2]
{143, [1, 0, 4, 3, 2]}
>>> mkDieGenCustom 143 []
{143, rdIntsPrime}