Skip to content

Commit

Permalink
Merge pull request #2 from tomsmeding/patch-1
Browse files Browse the repository at this point in the history
Add note about `Random` class
  • Loading branch information
wouter-swierstra authored Jul 10, 2024
2 parents 4fe90d1 + a6e1896 commit e6d771d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion as2.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ Haskell has one available in the `System.Random` library. Random number
generators need to have access to a piece of state called the seed, as such
the random number generator runs in a monad, the `IO` monad to be exact.

**Exercise 2:** Give `Random` instances for `Coin` and `Dice`.
**Exercise 2:** Give `Random` instances for `Coin` and `Dice`. (The `Random`
class has been largely superseded by other classes in the `random` package with
a different design, but `Random` is more low-tech and sufficient for our
purposes.)

**Exercise 3:** Give a `MonadGamble` instance for the `IO` monad.

Expand Down

0 comments on commit e6d771d

Please sign in to comment.