Add unzip and unzipWith for Map and IntMap
- Dominant language
- Haskell
- Stars
- 355
- Forks
- 194
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 4
Description
The `these` package provides an `unzip` for these types, but it's a "two pass" `fmap`-based implementation that can leak memory. I suggested a solution using `traverseBia` from `bifunctors`, but that was rejected as too hard to understand. @phadej [recommended adding the unzipper to `containers` instead](https://github.com/haskellari/these/pull/164). We can do this fairly simply, and certainly more efficiently than `traverseBia` can (at least until https://github.com/ekmett/bifunctors/pull/93 eventually reaches Hackage).
I'll try to implement these next weekend; if someone else gives it a shot, they should be mindful of the fairly subtle `NOINLINE` tricks that tend to be required to ensure we get the selector thunks we want.
Contributor guide
Assessment
This issue has not been assessed yet.