http://arcfn.com/doc/table.html#obj http://arcfn.com/doc/template.html
macros are pretty good for language-type thingies since they let you parse the raw input. this could be done as an interface layer on top of the actual mechanisms so you could write things like:
(logic A -> B A)