Minor edits.
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
@@ -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` | | |
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user