In #194 I've noticed that functions mapToFst/mapToSnd/mapBoth have a bit misleading name. Check out the type:
mapToFst :: (a -> b) -> a -> (b, a)
when I would expect it to have the following type:
mapToFst :: (a -> b) -> f a -> f (b, a)
(which is exactly what was needed in the mentioned PR, and we used map (mapToFst f) in there).
I also understand, that this is breaking change and I am not sure if it worth it. Need to thing about renaming or deprecating process a bit harder.
Anyway, at least adding functions which would actually map the containers is also a possible solution for the issue. I would really appreciate the discussion of this problem.
cc @kowainik/dev
In #194 I've noticed that functions
mapToFst/mapToSnd/mapBothhave a bit misleading name. Check out the type:when I would expect it to have the following type:
(which is exactly what was needed in the mentioned PR, and we used
map (mapToFst f)in there).I also understand, that this is breaking change and I am not sure if it worth it. Need to thing about renaming or deprecating process a bit harder.
Anyway, at least adding functions which would actually map the containers is also a possible solution for the issue. I would really appreciate the discussion of this problem.
cc @kowainik/dev