In this challenge, the goal is to create a pristine truth machine in as few bytes as possible. For reference, a truth machine does the following:
- Takes input, which is always 0 or 1
- If the input is 0, it is printed and the program terminates
- If the input is 1, it is printed forever
A pristine program is one that does not error on its own, but will error if any single substring with a length \$1\le n<p\$ is removed (where \$p\$ is the length of the program).
For example, if the
main did not error in some language, it would be pristine if all of the following produced an error:
mai man min ain ma mn in m n
The goal of this challenge is to write the shortest program or function (in bytes, per language) which is a pristine truth machine.