Last active
November 10, 2016 15:54
-
-
Save aweary/b32ed12c829bcbc352ebb18f3641255c to your computer and use it in GitHub Desktop.
Predicate logic in Javascript
This file contains 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
const nand = (x, y) => !(x && y) | |
const not = (x) => nand(x, x) | |
const and = (x, y) => not(nand(x, y)) | |
const or = (x, y) => nand(not(x), not(y)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment