Implement @sum operation.