Update cachematrix.R

I think the code is working well