BTW - why use an IO action for random number generation? There's a perfectly good pure generator. It's probably handy to treat it monadically to sequence the generator state/seed/whatever but random number generation can be completely pure.===================
*Pseudo* random number generation can of course be pure (though threading the state would be tedious and error-prone). If you want truly random numbers you cannot avoid IO (the monad).Лев Никитин :
Bardur, Lev, of course you try to be helpful, but you are answering wrong questions.If seed depends of psudo random event, for example of current systime, we must use IO action.