Adding solution to cachematrix.R