diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-11-29 21:11:30 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-11-29 21:11:30 -0500 |
| commit | eb4b4aa88f59b7c4188644be33ffa00e85f818a0 (patch) | |
| tree | 798df067288152d5d20ec1aed916a1f57083775c /spec | |
| parent | 80de67787aa1a7e186c7f3358ec4b45741f15ff5 (diff) | |
Creating a derived function shouldn't fail
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/evaluate.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/evaluate.md b/spec/evaluate.md index 7bcbf5a6..a1c4ef43 100644 --- a/spec/evaluate.md +++ b/spec/evaluate.md @@ -57,4 +57,4 @@ The following rules always create *derived operations*, either 1-modifiers or de | `Operand` | `Derv` | `Fork` | `{(𝕨L𝕩)C(𝕨R𝕩)}` | `nothing?` | `Derv` | `Fork` | `{ C(𝕨R𝕩)}` -As with applications, all expressions are evaluated in reverse source order before doing anything else. Then a result is formed without calling the center value. Its behavior as a function is described in the rightmost column, using `L`, `C`, and `R` for the results of the expressions in the left, center, and right columns, respectively. For the first two rules (*partial application*), the given operand is bound to the 2-modifier: the result is a 1-modifier that, when called, calls the center 2-modifier with the bound operand on the same side it appeared on and the new operand on the remaining side. A *train* is a function that, when called, calls the right-hand function on all arguments, then the left-hand function, and calls the center function with these results as arguments. In a modifier partial application, the result will fail when applied if the center value does not have the 2-modifier type, and in a fork, it will fail if any component has a modifier type (that is, cannot be applied as a function). BQN implementations are not required to check for these types when forming the result of these expressions, but may give an error on formation even if the result will never be applied. +As with applications, all expressions are evaluated in reverse source order before doing anything else. Then a result is formed without calling the center value. Its behavior as a function is described in the rightmost column, using `L`, `C`, and `R` for the results of the expressions in the left, center, and right columns, respectively. For the first two rules (*partial application*), the given operand is bound to the 2-modifier: the result is a 1-modifier that, when called, calls the center 2-modifier with the bound operand on the same side it appeared on and the new operand on the remaining side. A *train* is a function that, when called, calls the right-hand function on all arguments, then the left-hand function, and calls the center function with these results as arguments. |
