Update cachematrix.R

implement functions