R-programming Coursera course Programming Assignment 2, a function to cache and return the inverses of matrices