Adams changes to cachematrix for Programming Assignment number 2