Switch 'reduce' call to 'mapcat'