Update cachematrix.R

Update with implementation.