Working version of cachematrix.R