A factory that returns a function that performs linear interpolation, allowing for "steps" or discontinuities.