Update cachematrix.R

cachematrix implementation