I have been reading that the only way to generate random numbers in Haskell is using IO. However, when I want to use this random number with the (!!) operator I can't because it only takes in an Int and not IO Int.
Suppose I have a list [Monday, Tuesday, Wednesday, Thursday, Frdiay]. I want to randomly select an element from that list. I am not sure how to using randomRIO.
Thanks for any help.