From ab74b5cee5260544dd651b7edc22ad8b3554cdde Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sat, 19 Jun 2021 22:00:51 -0400 Subject: =?UTF-8?q?Clarify=20valid=20uses=20of=20=F0=9D=95=8E=20as=20Nothi?= =?UTF-8?q?ng?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/evaluate.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec') diff --git a/spec/evaluate.md b/spec/evaluate.md index 0ad6bf10..90ed32a9 100644 --- a/spec/evaluate.md +++ b/spec/evaluate.md @@ -20,7 +20,7 @@ To evaluate a block when enough inputs have been received, first the correct cas The only remaining step before evaluating the `BODY` is to bind the inputs and other names. Special names are always bound when applicable: `饾暔饾暕饾暏` if arguments are used, `饾暔` if there is a left argument, `饾晽饾晿` if operands are used, and `_饾暎` and `_饾暎_` for modifiers and combinators, respectively. Any names in the header are also bound, allowing multiple assignment for arguments. -If there is no left argument, but the `BODY` contains `饾暔` at the top level, then it is conceptually re-parsed with `饾暔` replaced by `路` to give a monadic version before application; this modifies the syntax tree by replacing some instances of `arg` with `nothing`. However, it also causes an error if, in a function that is called with no left argument, `饾暔` is used as an operand or list element, where `nothing` is not allowed by the grammar. The same effect can also be achieved dynamically by treating `路` as a value and checking for it during execution. If it is used as a left argument, then the function should instead be called with no left argument (and similarly in trains); it it is used as a right argument, then the function and its left argument are evaluated but rather than calling the function `路` is "returned" immediately; and if it is used in another context then it causes an error. +If there is no left argument, but the `BODY` contains `饾暔` or `饾晭` at the top level, then it is conceptually re-parsed with `饾暔` replaced by `路` to give a monadic version before application; this modifies the syntax tree by replacing some instances of `arg` with `nothing`. However, it also causes an error if, in a function that is called with no left argument, `饾暔` is used as an operand or list element, where `nothing` is not allowed by the grammar. In the case of `饾晭` it's almost always an error, only valid if used alone in a statement or as the left part of a `Fork`. True re-parsing is not required as the same effect can also be achieved dynamically by treating `路` as a value and checking for it during execution. If it's used as a left argument, then the function should instead be called with no left argument (and similarly in trains); if it's used as a right argument, then the function and its left argument are evaluated but rather than calling the function `路` is "returned" immediately; and if it's used in another context then it causes an error. ### Assignment -- cgit v1.2.3