Update cachematrix.R

This is my solution for the problem displayed in the Programming Assignment 2