Text this: A Functional Derivation of the Warren Abstract Machine