Update cachematrix.R

solution of programming assignment 2