DEV Community

loading...

Discussion on: What if we had a method on arrays called `.combineWith`?

Collapse
gillemic profile image
Michael Gillett

Seems similar to the .reduce() function in javascript. Although I don't know enough about .reduce() to know if your example would be attainable using it alone. Either way, good job on making a function and sharing it with us 🙂

Collapse
vonheikemen profile image
Heiker Author

Yes. It is exactly what reduce is good for. I'm trying an experiment in this post. Just to see what people think. Like what if it had a another name? Would they still hate it, to do the point of making a linting rule that won't let you ship code with it?