Skip to content

Instantly share code, notes, and snippets.

@callerobertsson
Last active February 16, 2017 08:31
Show Gist options
  • 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