My solution to the caching the inverse of a matrix assignment