Update cachematrix.R

add implementation