transform_reduce for in