Commit the example for practice for the programming assignment 2 (caching the mean value of a vector).