Update cachematrix.R

First try, test and fix later.