Haskell map function for two lists

354 views Asked by At

I need to apply a function to two lists. The map function is map :: (a->b) -> [a] -> [b], however I need something more like map2 :: (a->b->c) -> [a] -> [b] -> [c]. Is there a prelude function similar to map that can do this?

1

There are 1 answers

0
snak On BEST ANSWER

You can find such function by hoogling (a -> b -> c) -> [a] -> [b] -> [c]. Yes, it's called zipWith.