[Haskell-cafe] Does this function already exist in the libraries?
lemming at henning-thielemann.de
Fri Sep 8 06:10:39 EDT 2006
On Thu, 7 Sep 2006, Jason Dagit wrote:
> I've now found the following function useful in three different
> programs I've written:
> zipWith' :: (a -> a -> a) -> [a] -> [a] -> [a]
> zipWith' _  ys = ys
> zipWith' _ xs  = xs
> zipWith' f (x:xs) (y:ys) = f x y : zipWith' f xs ys
> Does it already exist or maybe there is another natural solution to
> use in its place?
I encountered that structure when adding numbers of two lists.
More information about the Haskell-Cafe