Caching inverse of a matrix

code