HowProgrammingWorks / HowProgrammingWorks/Composition
Function 'compose' applies functions to array of arguments instead of apply to every argument in array
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
File 4-multiple.js, line 3-4
could you use this tiny enhancement
const compose = (...fns) => (...args) => fns.reduce((args, fn) => args.map(v => fn(v)), args)
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
Open 4-multiple.js and inspect lines 3-4 first. Compare the current compose behavior with the requested expression, then verify that each function is applied to every argument in the array. Done means the compose implementation reflects the requested enhancement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100