Update cachematrix.R

Solution for R programming course