R f(x)s to cache a matrix and solve its inverse