applySubst now a proper catamorphism.