John Goerzen <[EMAIL PROTECTED]> writes:

> Here's an alternative:
>
> module Main where

(snip john's version)

And what list would be complete without a points-free version.  It
doesn't operate on stdin, though like John's does:

pointsFreeCat :: IO ()
pointsFreeCat = getArgs >>= mapM readFile >>= putStrLn . concat

-- And a regular version for reference

cat2 :: IO ()
cat2 = do a <- getArgs
          lines <- mapM readFile a
          putStrLn $ concat lines


peace,

  isaac
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to