Update cachematrix.R

version ready for programming assignment 2 submission.