Implemented cachematrix.R for Assignment 2 of R Programming course