makeCacheMatrix and cacheSolve based on mean examples from programming assignment page