Simplify solution to map with reduce.

https://github.com/timoxley/functional-javascript-workshop/issues/35