Created
October 2, 2016 03:11
-
-
Save sadhu89/588ebcf606b8caa864404277a10d3337 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.Random | |
starman :: Int -> IO () | |
starman n = do | |
g <- newStdGen | |
words = ["hello", "world", "haskell"] | |
word = words!!(fst (randomR (0,(length words) - 1) g)) | |
turn word ['-' | x <- word] n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
try this :