The compositions above are easily extendable to scope transformational, interactive and other different kind of attributed automata.
The approach is very similar to the approach of defining recursive descent parsers in functional programming. Based on the simpler concept of monoids, instead of monads, it is less general. On the other hand, we achieve the cleaner separation between the regular control structure and attribute manipulations. It remains the open problem whether the loss of generality is outweighed with greater modularity or not.