Update cachematrix.R

my work on assignment 2 of data science prog in R