Pair as bifunctor ? - Haskell

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Vincent L

Hi, I'd like to fmap the same function to the 2 members of a ([FilePath], [FilePath]). I think I need a bifunctor for that (it's the first time I would have to use one). Is there an instance of bifunctor for (,) ?

Torsten Schmits

with a Bifunctor, you would apply two functions to two elements, which may be the same

Vincent L

is there a shortcut operator ?

Torsten Schmits

there would also be the Traversal Control.Lens.both, if that's more your vibe

Vincent L

I think I will stick with both + simple functions but thanks for the hint