simple statistics from the command line (Haskell version)