Skip to content

Instantly share code, notes, and snippets.

@callerobertsson
Last active February 16, 2017 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save callerobertsson/ab5ddfaff5b9a0b05ecb to your computer and use it in GitHub Desktop.
Save callerobertsson/ab5ddfaff5b9a0b05ecb to your computer and use it in GitHub Desktop.
Haskell: Simple wc command (no options)
module Main where
import Text.Printf
main = do
input <- getContents
printf "%8d%8d%8d\n"
(length (lines input))
(length (words input))
(length input)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment