-- $Id: strcat.ghc,v 1.3 2001/06/16 01:24:09 doug Exp $ -- http://www.bagley.org/~doug/shootout/ -- from Josef Svenningsson -- shortened by Bryn Keller import System(getArgs, getProgName) lengthNHellos n = length (concat (replicate n "hello\n")) main = do arg <- getArgs case arg of [number] -> putStrLn $ show $ lengthNHellos (read number) _ -> do name <- getProgName; fail ("Usage: " ++ name ++ "number")