With struct do

I’m giving the user more options, so they can think about how they want to write their program. The functor looks pretty close to the x = compositetype(1,2) line in the OP (and so does an outer constructor!).