Update cachematrix.R

function implementations