Solution to Problem 1 in literate CoffeeScript.