Update cachematrix.R

Submission for Project 2.