Last active
June 14, 2024 08:09
-
-
Save scottlingran/cdd69d7d9e898c36bb8c878c2c4b19a8 to your computer and use it in GitHub Desktop.
The Liar paradox is not so paradoxical if seen as an automata.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Automata { | |
constructor() { | |
this.sentence = false; | |
} | |
run() { | |
while (true) { | |
console.log(`This sentence is ${this.sentence}.`); | |
if (this.sentence === false) { | |
this.sentence = true; | |
} else if (this.sentence === true) { | |
this.sentence = false; | |
} | |
} | |
} | |
} | |
(function main() { | |
const automata = new Automata(); | |
automata.run(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment