Programming R - Assignment 2 - Cache Matrix