cachematrix.R

final commented version