cachematrix.R file to be committed for R assignment 2