extract logic common to R.lPartial and R.rPartial
Merge pull request #534 from davidchambers/partial

extract logic common to R.lPartial and R.rPartial