Text this: A generalization of the Itô formula