my solution for cachematrix functions
example scripts for ProgrammingAssignment 2