Text this: From nominal to higher-order rewriting and back again