Matthew Roberts <[EMAIL PROTECTED]> writes:
>> [Point-free] compositions of functions with arity greater than 1, >> [...] compositions of sections of composition or application, >> arrow notation without the sugar, and so forth---will always be more >> difficult to read and understand than the direct version.
> I have to agree (although I suspect few others will :))
I tend to agree, also. Type signatures help, of course. E.g. with the previously mentioned and rather cryptic function
(.) . (.) .(.)
I entered it into GHCi, and got
:: forall a a b c a. (b -> c) -> (a -> a -> a -> b) -> a -> a -> a -> c
and it suddenly is much clearer what it does.
Hmm... noting the discrepancy with HUGS mentioned later in this thread, I entered this into GHCi and got this:
[[
Prelude> :t (.) . (.) . (.)
(.) . (.) . (.) :: forall a a1 b c a2.
(b -> c) -> (a -> a1 -> a2 -> b) -> a -> a1 -> a2 -> c
]]
I think you maybe dropped the digits in the type variable names?
#g
------------ Graham Klyne For email: http://www.ninebynine.org/#Contact
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
