cachematrix.R update

Solution to Programming Assignment 2 of the R Programming course on Coursera.