Update cachematrix.R

This is the solution to the problem