cachematrix.R edited