Implemented cachematrix.R.