= Solution
The most general <polymorphic> <type signatures> and definitions are:
``
infixr 9 .
(.) :: (b -> c) -> (a -> b) -> a -> c
(f . g) x = f (g x)
zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
zipWith f (x:xs) (y:ys) = f x y : zipWith f xs ys
zipWith _ _ _ = []
uncurry :: (a -> b -> c) -> (a,b) -> c
uncurry f (x,y) = f x y
``
<Function composition> passes the result of the second function into the first. `zipWith` combines corresponding <list> elements and stops when either list ends. <Uncurrying> converts a function taking two successive arguments into one taking a pair. None of these operations needs a numeric or ordering constraint.
Back to article page