Update cachematrix.R

Final solution (may be a change of arguments is needed)