wrote cachematrix.R R function to cache potentially time-consuming computations.