Solution for Programmig Assignment 2: Lexical Scoping