Edited cachematrix.R per Coursera assignment requirements