Solved assignment (cachematrix.R)