Added my solution to cachematrix.R