Update cachematrix.R

Added my part of the code to submission.