Text this: Algebraic semantics of imperative programs