For funsies, let's implement JavaScript's Map(), Filter(), and Reduce() in C++.
Map()
Filter()
Reduce()