*digit_sum* can be expressed as the composition of two functions: digits, and sum. A sum function already exists, so what remains to implement is a digits function and a compose function that takes two functions as input and returns a new function which applies both those functions to its argument.

Arguably it would be overall simpler to do it all in one function, but then again, this is very nice:

`digit_sum = compose(sum, digits)`

It only takes a glance to conclude that it's correct.

That digits function might be useful for other purposes as well. What about digit_product? (multiplication)

`digit_product = compose(product, digits)`

Python doesn't have a multiplication counterpart to sum, but it's still a nice idea.