Jos van Uden:

This is what I have now (incorperated part of your suggestions):

http://codepad.org/wjaSgppT

It looks good. It's not a strongly typed code (because states are just chars), and it's not much flexible because UTM is not templated on Symbol and State, but for this task it's OK.

Some small changes:
http://codepad.org/r4NkxTcn

Before putting it in Rosettacode the UTM constructor needs a pre-condition that verifies the full correctness of all its inputs. Then do you want to put it in Rosettacode yourself?

Bye,
bearophile

Reply via email to