|
|
|
|
|
by jfecher
1458 days ago
|
|
map2 is indeed another name for zipWith. I believe I got that name from Racket if memory serves. Compared to zipWith I like its symmetry with the 1 argument map. I also wasn't aware of bimap! I can't seem to find a function of that name online, though I did find the BiMap haskell package, is that what you're referring to? And yes, the dot product should be 32, thank you :) |
|
As you have the normal map function for Functors (using Haskell):
you can have bimap for Bifunctors: which specialised to pairs is: