Working Code for Caching Matrix Inverse