This took me more than one attempt to get right, so I thought I'd blat it out in
a blog post in case anyone else has been struggling with it. In the end, the
implementation matches your intuition, but getting the sub-classing syntax right
took a few tries