Update cachematrix.R

Update 2 for assignment2