Guest User

Untitled

a guest
Oct 16th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. module Main where
  2.  
  3. import qualified Random
  4.  
  5. main :: IO ()
  6. main = do
  7. a <- randInt 0 100
  8. putStrLn $ show a
  9.  
  10. -- generate random number between [lo, hi]
  11. randInt :: Int -> Int -> IO Int
  12. randInt x y = Random.getStdRandom (Random.randomR (x, y))
Add Comment
Please, Sign In to add comment