cachematrix.R: function verified.