Dylan Version of Problem 3