diff options
| author | Shinya Sato <shinnya.sato@gmail.com> | 2024-03-05 18:19:27 +0900 |
|---|---|---|
| committer | Shinya Sato <shinnya.sato@gmail.com> | 2024-03-05 18:19:27 +0900 |
| commit | 49960d8950d001a372a0abde670a66ee60026957 (patch) | |
| tree | adad1d5fe428bf0bea151f71ed114223fc246bca /sample/turing_machine | |
| parent | 0cf73da9ad035089c66d21021a656e4606796c47 (diff) | |
| download | inpla-49960d8950d001a372a0abde670a66ee60026957.tar.gz inpla-49960d8950d001a372a0abde670a66ee60026957.zip | |
v0.12.0
Diffstat (limited to '')
| -rw-r--r-- | sample/turing_machine/TuringMachine.in (renamed from sample/TuringMachine.in) | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sample/TuringMachine.in b/sample/turing_machine/TuringMachine.in index 2819d19..260f609 100644 --- a/sample/TuringMachine.in +++ b/sample/turing_machine/TuringMachine.in @@ -40,8 +40,8 @@ getRule(r) >< (int state, int sym) // resultTape << changeSym(headPos, sym, tape) // ----------------------------------------- -changeSym(resultTape, headPos, sym) >< t:ts => // <-- t:ts is tape - resultTape << changeSym_sub([], headPos, sym, t:ts); +changeSym(resultTape, headPos, sym) >< tape => // <-- tape is a list + resultTape << changeSym_sub([], headPos, sym, tape); changeSym_sub(r, done, int headPos, int sym) >< (int t):ts | headPos == 0 => r << Append(done, sym:ts) @@ -76,8 +76,8 @@ do(r, tape, int state, int head) >< Halt => // tapeDone << getSym(sym, int headPos, tape) // ----------------------------------------- -getSym(tapeDone, sym, int headPos) >< t:ts => // <- t:ts is tape - tapeDone << getSym_sub([], sym, headPos, t:ts); +getSym(tapeDone, sym, int headPos) >< tape => // <- tape is a list + tapeDone << getSym_sub([], sym, headPos, tape); getSym_sub(r, done, sym, int headPos) >< (int t):ts |
