Implement #map using #reduce