Update cachematrix.R

This is the completed Programming Assignment 2.