Programming Assignment 2: Lexical Scoping. Adding matrix caching for the solve (inverse) function