Working solution cachematrix.R