Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
The Art of Reduction 🦅 solution in Clear category for Sum by Type by vincent.tscherter
var sumByTypes = (values) => values.reduce(
([a, b], c) => c===+c ? [a, b + c] : [a + c, b],
['', 0]
)
May 16, 2020
Comments: