diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-03-21 02:27:15 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-03-21 02:27:15 +0900 |
| commit | 66f34dd37df679664e4f2f1baaba4bc49041cd83 (patch) | |
| tree | 082aa9f8ee020a4da3e1fb0fccecc7c64ae97026 /README.md | |
| parent | 289ecbad08fd01c45fe3ca25aa708489f8cf0ce9 (diff) | |
| download | nsfisis-66f34dd37df679664e4f2f1baaba4bc49041cd83.tar.gz nsfisis-66f34dd37df679664e4f2f1baaba4bc49041cd83.tar.zst nsfisis-66f34dd37df679664e4f2f1baaba4bc49041cd83.zip | |
golf
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -9,9 +9,8 @@ s = ' > . > +++++ . >> ++ . < +++++ . < . > . < . ' -m=[p=n=0,0,0,0,0];c=-1;case s[c];when'>';p+=1;when'<';p-=1 -when'+';m[p]+=1;when'-';m[p]-=1;when'.';print m[p].chr;when -'[';loop{;case s[c+=1];when'[';n+=1;when']';break if n==0; -n-=1;end;}if m[p]==0;when']';loop{;case s[c-=1];when']';n+=1 -;when'[';break if n==0;n-=1;end;}if m[p]!=0;end while s[c+=1] +m=[c=p=0,0,0,0,0];(k=s[c])=='>'?p+=1:k=='<'?p-=1: +k=='+'?m[p]+=1:k=='-'?m[p]-=1:k=='.'?putc(m[p]): +k=='['?(0until s[c+=1]==']'if m[p]==0): +k==']'?(0until s[c-=1]=='['if m[p]!=0):0while s[c+=1] ``` |
