Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Tristable oscillatorby ikegami (Patriarch) |
on Jul 08, 2008 at 21:47 UTC ( [id://696348]=note: print w/replies, xml ) | Need Help?? |
Very neat! But it has four states.
That it has a distinct "initializing" state could seen as an advantage. If not, change the initial string to one of states 2, 3 or 4 to get a purely three state engine.
Modified engine that tracks the states:
As for your question, longer is trivial. Shorter, on the other hand...
And with an "initializing" state:
In Section
Obfuscated Code
|
|