Skip to content

Instantly share code, notes, and snippets.

@banbh
Created April 13, 2009 00:45
Show Gist options
  • Select an option

  • Save banbh/94189 to your computer and use it in GitHub Desktop.

Select an option

Save banbh/94189 to your computer and use it in GitHub Desktop.
import System.Random
rollDice = getStdRandom (randomR (1,6))
main = do roll <- rollDice
print roll
sg <- getStdGen
let rl = randomRs (1,6) sg
print $ take 5 rl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment