[Haskell-cafe] Function application like a Unix pipe

Tomasz Zielonka tomasz.zielonka at gmail.com
Wed Nov 23 12:08:13 EST 2005

On Wed, Nov 23, 2005 at 09:01:07AM -0800, Scherrer, Chad wrote:
> So I think of the types as being 
> grep "." *.hs :: String
> wc :: String -> Int  -- ok, not really, but it shows the point better.

Every unix program has a standard input, even if it doesn't use it, so
I would rather give this type to grep "." *.hs:

    grep "." *.hs :: a -> String

You can run something like this

    p | echo bla | grep "." *.hs | wc

even if it seems non-sensical.

Best regards

More information about the Haskell-Cafe mailing list