A more complex example

Trying a non-trivial example shows some awkwardness in the interface.
Would be good to have fewer ad-hoc functions... food for thought...
food for lynxes.