Skip to content

Instantly share code, notes, and snippets.

@jackdalton
Created May 16, 2016 22:33
Show Gist options
  • Save jackdalton/1db88b5d746075cd28a460f455373987 to your computer and use it in GitHub Desktop.
Save jackdalton/1db88b5d746075cd28a460f455373987 to your computer and use it in GitHub Desktop.
The "cat" command line utility, implemented in Haskell.
import System.Environment
main :: IO ()
main = do
args <- getArgs
let fileName = head args
fcontents <- readFile fileName
print fcontents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment