aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthe lemons <citrons@mondecitronne.com>2022-02-19 19:35:34 -0600
committerthe lemons <citrons@mondecitronne.com>2022-02-19 19:35:34 -0600
commitf3d150966146ec5d0c40eabe88de5344cf6ef787 (patch)
tree4aefc0ed6260d88a166d57c3a509a5741f268709
parentf610fba24bb03a5c8b48782878b90862837c8e40 (diff)
"innermost"
-rw-r--r--readme.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/readme.md b/readme.md
index 9464d4d..9aadaaf 100644
--- a/readme.md
+++ b/readme.md
@@ -71,7 +71,7 @@ lists can be interpreted semantically as meaning all of its elements in order. f
## lambdas
a lambda is a special type of noun representing a CR document. the `@` operator is used to apply lambdas to arguments. to evaluate a lambda, the noun `X` is assigned to the argument within the scope of the lambda. the document is then evaluated. the last sentence of a lambda does not have the meaning of a normal sentence. instead, its expression is evaluated, and the lambda application evaluates to this result.
-lambdas are lexically scoped. scope affects the behavior of the `::=` operator. a noun's definition according to this operator is the definition or redefinition in the most inner scope that encloses its usage. a lambda's scope is that in which it is defined. lambdas are evaluated within the scope of their initial definition.
+lambdas are lexically scoped. scope affects the behavior of the `::=` operator. a noun's definition according to this operator is the definition or redefinition in the innermost scope that encloses its usage. a lambda's scope is that in which it is defined. lambdas are evaluated within the scope of their initial definition.
this example illustrates the scoping behavior of lambdas:
```
@@ -89,6 +89,9 @@ the two operands are denoted as `x` and `y` in these definitions. they are the f
### `=`
`x` which is the same thing as `y`
+### `==`
+`x` which is completely identical to `y`
+
### `::=`
the noun `z`, as defined in the word list; *define or redefine* `x`*'s name in the present scope to have the value of* `y`
@@ -137,6 +140,9 @@ a hypothetical `y` which exists according to/in the perspective of `*_x`
### `*`
`y` composed of `x`
+### `\`
+`y` subject to the conditions `x`
+
### `@`
the result of the application of the lambda `y` to the argument `x`. see ยง lambdas.