Edit the R file

Completed the functions of the R file to create a solution for cached
matrix.