When the type 'a sometree is first defined, a reduce visitor can be immediately generated for it, as follows: At this point, we pretend that we do not know yet what this visitor will be used for, so we do not annotate the type definition with delay , and do not use delayed_tree_monoid as a base class.