Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import Control.Monad.State
  2.  
  3. random :: State Int Int
  4. random = state $ \x ->
  5.     let y = (x+11) `mod` 17
  6.     in (y,y)
  7.  
  8. random3 = do
  9.     x <- random
  10.     y <- random
  11.     z <- random
  12.     return (x,y,z)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement