Updated cachematrix.R with code and comments