Solution to Concordia University's COMP348 (Principles of Programming Languages) Assignment 2