Changed dividedDifference function to use pattern matching.
Implemented hermite interpolation and refactored the original interpolation method based on Newton's method to use hermite internally.