implementation of cachematrix.R by Cliff

Cliff Liu‘s implementation