On 10/4/07, Dominic Steinitz <[EMAIL PROTECTED]> wrote: > Look at the type of (.).(.).(.)
Indeed, this generalizes to functions of any arity on the "RHS": Prelude> :t (.) (.) :: (b -> c) -> (a -> b) -> a -> c Prelude> :t (.).(.) (.).(.) :: (b -> c) -> (a -> a1 -> b) -> a -> a1 -> c Prelude> :t (.).(.).(.) (.).(.).(.) :: (b -> c) -> (a -> a1 -> a2 -> b) -> a -> a1 -> a2 -> c Prelude> :t (.).(.).(.).(.) (.).(.).(.).(.) :: (b -> c) -> (a -> a1 -> a2 -> a3 -> b) -> a -> a1 -> a2 -> a3 -> c Of course, if you want higher-arity functions anywhere *other* than the head of your composition chain, you'll have to resort to tupling and uncurrying. Stuart _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
