Type State Pattern
Does anybody have a code-snippet that demonstrates a standard Type State Pattern in Mojo?
For example, a somewhat textbook-example of a traffic light -- please excuse any typos I make in my sloppy hand-jam example.
Anyway, does anybody have a snippet of Mojo-style Type State Pattern? Google says "no," but I imagine somebody has a personal snippet they might share.
For example, a somewhat textbook-example of a traffic light -- please excuse any typos I make in my sloppy hand-jam example.
Anyway, does anybody have a snippet of Mojo-style Type State Pattern? Google says "no," but I imagine somebody has a personal snippet they might share.
