Finished the assignment

Edited the comments and wrote the two functions. Tested them on a simple
matrix(1:4,2,2) - it worked!