Update cachematrix.R

Implement cachematrix functions per programming assignment.