Complete cachematrix.R

Implement the functionality