Thanks! My use case was very specific, but the concept is so simple I was wondering what people would do with it.
Be careful. These things tend to morph, mutate and become turing-complete. If it grows an emacs step back quietly and slowly. Just remember to feed it plenty of parentheses and you'll be fine.