Replace homegrown partial with functools'