msemochkin

Untitled

Mar 8th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import System.Environment
  2.  
  3. func :: [String] -> IO()
  4. func args = do
  5.   print . head $ args
  6.  
  7. main :: IO ()
  8. main = do
  9.   args <- getArgs
  10.   if not (null args)
  11.     then
  12.       func args
  13.     else
  14.       putStrLn "Missing argument"
Advertisement
Add Comment
Please, Sign In to add comment