Design: Reduce with empty array shouldn't default to 0
Open
Nobody has claimed this yet.
documentation
- Dominant language
- TypeScript
- Stars
- 51
- Forks
- 10
- Avg merge
- 4m
- Merged PRs (30d)
- 1
Description
Since reduce works with non-numbers too, there shouldn't be a default in this case, but rather null or an error.
Contributor guide
No contributing guide indexed for this repository
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
The issue names no file, test, or entry point. First locate the reduce implementation and inspect how an empty array is currently handled, then review existing behavior for non-number reductions. Done requires a decided and tested empty-array behavior, since the issue leaves null versus an error unresolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100