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 yFunction 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. Articles by others on the same topic
There are currently no matching articles.