Zakhar Kleevitskiy's Caching the Inverse of a Matrix implementation