Last active
December 5, 2017 08:18
-
-
Save barneycarroll/1763ce04f554702af57996253d75aa73 to your computer and use it in GitHub Desktop.
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 [not, definitively] = [Symbol(), Symbol()] | |
export default const possibly = possibility => premise => alternatively => | |
[premise, ...possibility, definitively].reduce((premise, postulate) => | |
premise === not | |
? | |
alternatively | |
: | |
postulate === definitively | |
? | |
premise | |
: | |
postulate in premise | |
? | |
premise[postulate] | |
: | |
not | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's the Material Design Lite of code styles