Given any generator object g, you can perform the following operations on it:
- g(): This scrambles the internal state of the generator and yields its next output.
- g.min(): This tells you the smallest possible output of g() (typically 0).
- g.max(): This tells you the largest possible output of g(). That is, the range of
possible outputs of g() is g.min() to g.max() inclusive. - g.discard(n): This effectively makes n calls to g() and discards the
results. In a good library implementation, you'll pay for scrambling the generator's internal state n times, but save any cost associated with computing the next outputs from the state.