Refactor _.partial.

This implementation removes an array allocation and reduces the complexity quite a bit.