Skip to content

Instantly share code, notes, and snippets.

@HokieGeek
Created May 19, 2015 15:12
Show Gist options
  • Save HokieGeek/59d5e6ae858be45b7a93 to your computer and use it in GitHub Desktop.
Save HokieGeek/59d5e6ae858be45b7a93 to your computer and use it in GitHub Desktop.
Study this
import System.Environment
main = getArgs >>= test
test :: [String] -> IO()
test x
| x !! 0 == "foo" = putStrLn "w00t!"
| otherwise = putStrLn(x !! 0 ++ "bar")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment