On Dec 7, 2007 8:39 PM, Dan Weston <[EMAIL PROTECTED]> wrote: > > compose f g = f . g > > > > compose' f g x = f (g x) > > > > Are you saying that these two exactly equivalent functions should have > > different arity? If not, then is the arity 2 or 3? > > Prelude> :t let compose f g = f . g in compose > let compose f g = f . g in compose :: (b -> c) -> (a -> b) -> a -> c > Prelude> :t let compose' f g x = f (g x) in compose' > let compose' f g x = f (g x) in compose' :: (t -> t1) -> (t2 -> t) -> t2 > -> t1 > > The arity is the number of top-level -> > > Both are arity 3.
Hmm, this still seems ill-defined to me. compose :: (Int -> Int -> Int) -> (Int -> Int) -> Int -> Int -> Int Is a valid expression given that definition (with a,b = Int and c = Int -> Int), but now the arity is 4. Luke _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe