I write a simple Haskell program using Haste ( https://www.haste-lang.org/ ). I need to get a random number from range 1-100. How can I do this?
Asked
Active
Viewed 69 times
1 Answers
1
randomRIO (1,100) :: IO Int
would generate such a random number.
Note that since this is not a pure value, it can only be used inside the IO monad.
See the System.Random
documentation for more information.

chi
- 111,837
- 3
- 133
- 218