Combinators for iterating over tree IR