Created
April 6, 2018 11:18
-
-
Save jeremysinger/c77de1342921e0834769b050a21527e1 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.Environment (getArgs) | |
main :: IO () | |
main = do | |
args <- getArgs | |
if length args /= 2 | |
then do | |
putStrLn "usage: starman WORD NUM_GUESSES" | |
else | |
let word = args!!0 | |
guesses = read (args!!1) :: Int | |
in do | |
starman word guesses | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment