Implemented makeCacheMatrix function