Data.List.NonEmpty.intersect and Data.List.NonEmpty.intersectBy throw when intersection empty
evaogbe-vermeer opened this issue · 2 comments
evaogbe-vermeer commented
I think they should be changed to match the implementation of the corresponding functions in NonEmptyArray, i.e. return a List instead of a NonEmptyList.
Alternatively, I saw the discussion in #184 about potentially removing the set functions from Array, List, NonEmptyList, NonEmptyArray, etc. and replacing them with an ordered set type. This might be more evidence supporting those who want to remove them.
garyb commented
Ah yeah, they should definitely return List!
eoogbe commented
Oops just realized I reported the issue on my work account. The PR with the fix is using the correct personal account.