Minor edits.

This commit is contained in:
sforman
2023-08-13 08:47:16 -07:00
parent 9f78b6d8fd
commit 1f5bea98b6
6 changed files with 94 additions and 233 deletions
+1 -2
View File
@@ -4,6 +4,5 @@ https://www.youtube.com/watch?v=_IgqJr8jG8M
"Complete and Easy Bidirectional Typechecking
for Higher-Rank Polymorphism"
"Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism"
+40
View File
@@ -284,3 +284,43 @@ List Manipulation
concat cons first
#############################################
Stashing this here for now
### AND, OR, XOR, NOT
There are three families (categories?) of these operations:
1. Logical ops that take and return Boolean values.
2. Bitwise ops that treat integers as bit-strings.
3. Short-Circuiting Combinators that accept two quoted programs
and run top quote *iff* the second doesn't suffice to resolve the clause.
(in other words `[A] [B] and` runs `B` only if `A` evaluates to `true`,
and similarly for `or` but only if `A` evaluates to `false`.)
(So far, only the Elm interpreter implements the bitwise ops. The others
two kinds of ops are defined in the `defs.txt` file, but you could implement
them in host language for greater efficiency if you like.)
| op | Logical (Boolean) | Bitwise (Ints) | Short-Circuiting Combinators |
|-----|-------------------|----------------|------------------------------|
| AND | `/\` | `&&` | `and ` |
| OR | `\/` | `\|\|` | `or` |
| XOR | `_\/_` | `xor` | |
| NOT | `not` | | |