Dylan version of Problem 2