Add native reduce implementation