Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
bobbylarrybobby
on Oct 12, 2021
|
parent
|
context
|
favorite
| on:
Algebraic data types: things I wish someone had ex...
Yes, for the same reason that if you want to do logic, you'll need both the "and" and "or" operators; neither "and" nor "or" alone suffice.
Hercuros
on Oct 13, 2021
[–]
This is not true for classical logic, because AND can be written using NOT and OR using DeMorgan's law.
kd0amg
on Oct 13, 2021
|
parent
[–]
OR alone is insufficient
because
you still need NOT (or AND and ⊥). You can also encode sum-like behavior using negation and products (a continuation consuming a pair of continuations).
Consider applying for YC's Winter 2027 batch!
Applications
are open till November 2.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: