[Haskell-cafe] Function composition

Oscar Picasso oscarpicasso at gmail.com
Fri Dec 26 22:37:26 EST 2008


I can write:
*Main> let yes = not . not
*Main> :t yes
yes :: Bool -> Bool

But not:
*Main> let isNotEqual = not . (==)

    Couldn't match expected type `Bool'
           against inferred type `a -> Bool'
    Probable cause: `==' is applied to too few arguments
    In the second argument of `(.)', namely `(==)'
    In the expression: not . (==)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20081226/7b6590a0/attachment.htm

More information about the Haskell-Cafe mailing list