Programming Assignment 2 - R Function for Caching

This assignment is to write R functions to cache potentially
time-consuming computations so that the required values can be read from
cache rather than to be recomputed.