Integrated general combine function.