I am with trouble related to Haskell Random generator. At university, i have to deal with Java all my way around, so now I'm, corrupted with it.
I am developing a game in Haskell, and now I face something like 'chance to do something', and that chance needs to be like Int -> Bool
. In Java, I would have done
new Random().nextInt(100)
and there, problem solved! In Haskell I have to choose something in a monad IO or something with a seed. None of these does what I want. I don't really want to use IO monad in my pure model, and the seed is awkward to use because I need to remember my new seed every time...
Is there something simple like Java's Random?