Ticket #1695 (closed proposal: duplicate)
library submission: Data.Either.unzipEithers :: [Either a b] -> ([a],[b])
|Reported by:||JeremyShaw||Owned by:|
|Type of failure:||Difficulty:||Easy (less than 1 hour)|
|Test Case:||Blocked By:|
Description (last modified by igloo) (diff)
This function is like unzip for a list of Eithers instead of tuples.
According to google code search, I am at least the 5th person to implement this function:
I opted for the name unzipEithers because the function is similar to two existing functions: unzip and catMaybes. It seems less similar to partition, because partition does not desconstruct the values, it just divides them into to two groups. I have no particular attachment to the name however.
I modeled the implementation after unzip and partition. Hopefully I made effective use of the irrefutable patterns and laziness, but someone else should verify.
Deadline: October 15