Data.List.NonEmpty.intersect and Data.List.NonEmpty.intersectBy throw when intersection empty

Open
#216 2 comments 0 reactions 0 assignees View on GitHub

@evaogbe is already working on this.

Since Dec 14, 2023.

  • #217 by @evaogbe — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
1/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Domain
backend

Research direction

Start by comparing Data.List.NonEmpty.intersect and intersectBy with the corresponding NonEmptyArray functions, as the issue suggests. Review the discussion in #184 and the linked pull request #217 before deciding what outcome is intended. Done means the intersection functions handle empty results consistently with the chosen API direction.

Written by the indexing model from the issue text.

Description

good first issue type: bug

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.

Dominant language
PureScript
Stars
61
Forks
50
Avg merge
2d 6h
Merged PRs (30d)
1

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from purescript/purescript-lists

All issues in purescript/purescript-lists

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.