extract logic common to R.lPartial and R.rPartial

We should determine the performance cost before merging this change. I imagine it'll be fairly small.

this make me think (again) we should do `concat = op(function concat(s1, s2) { ... })` since `concat` really is an infix operator