cachematrix.R Assignment