Completing cachematrix.R