Add ZipWith
- Dominant language
- TypeScript
- Stars
- 23
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
`zipWith` works similar to `zip`, but applies a function to all the elements in the lists.
Its signature is `(a -> b -> c) -> [a] -> [b] -> [c]` and should be used the following way:
When inherited:
```js
[1, 2, 3].zipWith((x) => x * 2, [4, 5, 6]) // => [4, 10, 18]
```
When used as a standalone function:
```js
zipWith((x) => x * 2, [1, 2, 3], [4, 5, 6]) // => [4, 10, 18]
```
Contributor guide
Research direction
Locate the existing zip implementation and its tests in the TypeScript library, then review how inherited and standalone functions are exposed. Add zipWith with the signature and behavior shown in the issue, and verify that both usage forms combine corresponding elements as demonstrated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100