A brief exercise in functional programming.