RFC: Clean up NonEmptyMap interface
Open
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 5.5k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 5
Description
NonEmptyMap is a bit annoying to use due to some inconsistencies:
- Although it has a
.keysmethod likeMapdoes, it doesn't have a corresponding.valuesmethod. There's something similar possible with.toNonEmptyList(fromNonEmptyTraverse), but that's not very discoverable. I suggest we adddef values: NonEmptyList[A] = this.toNonEmptyList. - It has a
.toNelmethod that produces a NEL of pairs. This is inconsistent with.toListand (which is especially silly) with.toNonEmptyList. I suggest we renametoNeltopairsor something like that.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start by locating the NonEmptyMap interface and its keys, toNel, and toNonEmptyList methods, then inspect related API tests. Done means the proposed values method and pair-naming change have an agreed design and corresponding behavior is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100