partialRight function