3 ms·
You have just discovered Brainf*ck, where every control flow is implemented via while. `if (current cell) { ... } else { ... }` for example would have to be imp
by lifthrasiir 4y ago
You have just discovered Brainf*ck, where every control flow is implemented via while. `if (current cell) { ... } else { ... }` for example would have to be implemented like `temp = 1; while (current) { ...; temp = 0; current = 0; } while (temp) { ...; temp = 0; current = 0; }` (there are many other approaches [1]).
[1] https://esolangs.org/wiki/Brainfuck_algorithms#if_.28x.29_.7B_code1_.7D_else_.7B_code2_.7D https://esolangs.org/wiki/Brainfuck_algorithms#if_.28x.29_.7...