Assignment 3: Simple Haskell programs Solution