Question: what is the difference between reduce and map?
Answer: When you "map", you're writing a function that transforms x with f(x) into some new value x1 . When you "reduce" you're writing some function g(y) that takes array y and emits array y1 . They work on different types of data and produce different results.