aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-11-29 21:18:19 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-11-29 21:19:47 -0500
commitda6694e6cb0755d6a232676808ee96cd5c06ef55 (patch)
tree3c78b9e8f7c2c7d1e0476d20ddef67e796ab4319
parenteb4b4aa88f59b7c4188644be33ffa00e85f818a0 (diff)
Remove partial 2-modifier application from the spec and docs
-rw-r--r--doc/expression.md2
-rw-r--r--docs/doc/expression.html14
-rw-r--r--docs/spec/evaluate.html16
-rw-r--r--docs/spec/grammar.html8
-rw-r--r--docs/spec/system.html10
-rw-r--r--spec/evaluate.md6
-rw-r--r--spec/grammar.md6
-rw-r--r--spec/system.md2
8 files changed, 9 insertions, 55 deletions
diff --git a/doc/expression.md b/doc/expression.md
index 5f639a0a..159f8d52 100644
--- a/doc/expression.md
+++ b/doc/expression.md
@@ -78,8 +78,6 @@ Here is a table of the modifier and function application rules:
| `F*` | `G` | `H` | Function | 3-train
| `F*` | `_m` | | Function | 1-Modifier
| `F*` | `_c_` | `G*` | Function | 2-Modifier
-| | `_c_` | `G*` | 1-Modifier | Partial application
-| `F*` | `_c_` | | 1-Modifier | Partial application
A function with an asterisk indicates that a subject can also be used. Since the role doesn't exist after parsing, function and subject spellings are indistinguishable in these positions. Modifier applications bind more tightly than functions, and associate left-to-right while functions associate right-to-left.
diff --git a/docs/doc/expression.html b/docs/doc/expression.html
index 4cff7678..8676b3d9 100644
--- a/docs/doc/expression.html
+++ b/docs/doc/expression.html
@@ -170,20 +170,6 @@
<td>Function</td>
<td>2-Modifier</td>
</tr>
-<tr>
-<td></td>
-<td><code><span class='Modifier2'>_c_</span></code></td>
-<td><code><span class='Function'>G</span><span class='Value'>*</span></code></td>
-<td>1-Modifier</td>
-<td>Partial application</td>
-</tr>
-<tr>
-<td><code><span class='Function'>F</span><span class='Value'>*</span></code></td>
-<td><code><span class='Modifier2'>_c_</span></code></td>
-<td></td>
-<td>1-Modifier</td>
-<td>Partial application</td>
-</tr>
</tbody>
</table>
<p>A function with an asterisk indicates that a subject can also be used. Since the role doesn't exist after parsing, function and subject spellings are indistinguishable in these positions. Modifier applications bind more tightly than functions, and associate left-to-right while functions associate right-to-left.</p>
diff --git a/docs/spec/evaluate.html b/docs/spec/evaluate.html
index 12e0338c..13d0c455 100644
--- a/docs/spec/evaluate.html
+++ b/docs/spec/evaluate.html
@@ -64,7 +64,7 @@
</table>
<p>In each case the constituent expressions are evaluated in reverse source order: Right, then Called, then Left. Then the expression's result is obtained by calling the Called value on its parameters. A left argument of <code><span class='Value'>nothing</span></code> is not used as a parameter, leaving only a right argument in that case. The type of the Called value must be appropriate to the expression type, as indicated in the &quot;Types&quot; column. For function application, a data type (number, character, or array) is allowed. It is called simply by returning itself. Although the arguments are ignored in this case, they are still evaluated. A braced construct is evaluated by binding the parameter names given in columns L and R to the corresponding values. Then if all parameter levels present have been bound, its body is evaluated to give the result of application.</p>
<p>Modifiers that are evaluated when they receive operands are called <em>immediate</em>. Other modifiers, including primitives and some kinds of block, simply record the operands and are called <em>deferred</em>. The result of applying a deferred modifier once is called a <em>derived function</em>.</p>
-<p>The following rules always create <em>derived operations</em>, either 1-modifiers or derived functions. A derived operation is identified by the rule that created it, and the values of its parts.</p>
+<p>The rules for trains create another kind of derived function. A derived function is identified by the rule that created it, and the values of its parts.</p>
<table>
<thead>
<tr>
@@ -76,18 +76,6 @@
</thead>
<tbody>
<tr>
-<td></td>
-<td><code><span class='Modifier2'>_mod2_</span></code></td>
-<td><code><span class='Paren'>(</span> <span class='Value'>subject</span> <span class='Function'>|</span> <span class='Function'>Func</span> <span class='Paren'>)</span></code></td>
-<td><code><span class='Brace'>{</span><span class='Function'>š”½</span> <span class='Modifier2'>_C_</span> <span class='Function'>R</span><span class='Brace'>}</span></code></td>
-</tr>
-<tr>
-<td><code><span class='Function'>Operand</span></code></td>
-<td><code><span class='Modifier2'>_mod2_</span></code></td>
-<td></td>
-<td><code><span class='Brace'>{</span><span class='Function'>L</span> <span class='Modifier2'>_C_</span> <span class='Function'>š”½</span><span class='Brace'>}</span></code></td>
-</tr>
-<tr>
<td><code><span class='Function'>Operand</span></code></td>
<td><code><span class='Function'>Derv</span></code></td>
<td><code><span class='Function'>Fork</span></code></td>
@@ -101,4 +89,4 @@
</tr>
</tbody>
</table>
-<p>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 <code><span class='Function'>L</span></code>, <code><span class='Function'>C</span></code>, and <code><span class='Function'>R</span></code> for the results of the expressions in the left, center, and right columns, respectively. For the first two rules (<em>partial application</em>), 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 <em>train</em> 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.</p>
+<p>A <em>train</em> 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. 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 <code><span class='Function'>L</span></code>, <code><span class='Function'>C</span></code>, and <code><span class='Function'>R</span></code> for the results of the expressions in the left, center, and right columns, respectively.</p>
diff --git a/docs/spec/grammar.html b/docs/spec/grammar.html
index d28fa55b..8c002fb6 100644
--- a/docs/spec/grammar.html
+++ b/docs/spec/grammar.html
@@ -23,16 +23,14 @@
<span class='Value'>list</span> <span class='Function'>=</span> <span class='String'>&quot;⟨&quot;</span> <span class='Separator'>ā‹„</span><span class='Value'>?</span> <span class='Paren'>(</span> <span class='Paren'>(</span> <span class='Function'>EXPR</span> <span class='Separator'>ā‹„</span> <span class='Paren'>)</span><span class='Value'>*</span> <span class='Function'>EXPR</span> <span class='Separator'>ā‹„</span><span class='Value'>?</span> <span class='Paren'>)</span><span class='Value'>?</span> <span class='String'>&quot;⟩&quot;</span>
<span class='Value'>subject</span> <span class='Function'>=</span> <span class='Value'>atom</span> <span class='Function'>|</span> <span class='Function'>ANY</span> <span class='Paren'>(</span> <span class='String'>&quot;‿&quot;</span> <span class='Function'>ANY</span> <span class='Paren'>)</span><span class='Function'>+</span>
</pre>
-<p>Starting at the highest-order objects, modifiers have fairly simple syntax. In most cases the syntax for <code><span class='Gets'>←</span></code> and <code><span class='Gets'>↩</span></code> is the same, but only <code><span class='Gets'>↩</span></code> can be used for modified assignment. The export arrow <code><span class='Gets'>⇐</span></code> can be used in the same ways as <code><span class='Gets'>←</span></code>, but it can also be used at the beginning of a header to force a namespace result, or with no expression on the right in an <code><span class='Function'>EXPORT</span></code> statement.</p>
+<p>Starting at the highest-order objects, modifiers have simple syntax. In most cases the syntax for <code><span class='Gets'>←</span></code> and <code><span class='Gets'>↩</span></code> is the same, but only <code><span class='Gets'>↩</span></code> can be used for modified assignment. The export arrow <code><span class='Gets'>⇐</span></code> can be used in the same ways as <code><span class='Gets'>←</span></code>, but it can also be used at the beginning of a header to force a namespace result, or with no expression on the right in an <code><span class='Function'>EXPORT</span></code> statement.</p>
<pre><span class='Function'>ASGN</span> <span class='Function'>=</span> <span class='String'>&quot;←&quot;</span> <span class='Function'>|</span> <span class='String'>&quot;⇐&quot;</span> <span class='Function'>|</span> <span class='String'>&quot;↩&quot;</span>
<span class='Modifier2'>_m2Expr_</span> <span class='Function'>=</span> <span class='Modifier2'>_mod2_</span>
<span class='Function'>|</span> <span class='Modifier2'>_c_</span> <span class='Function'>ASGN</span> <span class='Modifier2'>_m2Expr_</span>
<span class='Modifier'>_m1Expr</span> <span class='Function'>=</span> <span class='Modifier'>_mod1</span>
- <span class='Function'>|</span> <span class='Modifier2'>_mod2_</span> <span class='Paren'>(</span> <span class='Value'>subject</span> <span class='Function'>|</span> <span class='Function'>Func</span> <span class='Paren'>)</span> <span class='Comment'># Right partial application
-</span> <span class='Function'>|</span> <span class='Function'>Operand</span> <span class='Modifier2'>_mod2_</span> <span class='Comment'># Left partial application
-</span> <span class='Function'>|</span> <span class='Modifier'>_m</span> <span class='Function'>ASGN</span> <span class='Modifier'>_m1Expr</span>
+ <span class='Function'>|</span> <span class='Modifier'>_m</span> <span class='Function'>ASGN</span> <span class='Modifier'>_m1Expr</span>
</pre>
-<p>Functions can be formed by fully applying modifiers or as trains. Modifiers are left-associative, so that the left operand (<code><span class='Function'>Operand</span></code>) can include modifier applications but the right operand (<code><span class='Value'>subject</span> <span class='Function'>|</span> <span class='Function'>Func</span></code>) cannot. Trains are right-associative, but bind less tightly than modifiers. Assignment is not allowed in the top level of a train: it must be parenthesized.</p>
+<p>Functions can be formed by applying modifiers, or with trains. Modifiers are left-associative, so that the left operand (<code><span class='Function'>Operand</span></code>) can include modifier applications but the right operand (<code><span class='Value'>subject</span> <span class='Function'>|</span> <span class='Function'>Func</span></code>) cannot. Trains are right-associative, but bind less tightly than modifiers. Assignment is not allowed in the top level of a train: it must be parenthesized.</p>
<pre><span class='Function'>Derv</span> <span class='Function'>=</span> <span class='Function'>Func</span>
<span class='Function'>|</span> <span class='Function'>Operand</span> <span class='Modifier'>_mod1</span>
<span class='Function'>|</span> <span class='Function'>Operand</span> <span class='Modifier2'>_mod2_</span> <span class='Paren'>(</span> <span class='Value'>subject</span> <span class='Function'>|</span> <span class='Function'>Func</span> <span class='Paren'>)</span>
diff --git a/docs/spec/system.html b/docs/spec/system.html
index 1fad9ee3..8f2b5295 100644
--- a/docs/spec/system.html
+++ b/docs/spec/system.html
@@ -447,16 +447,6 @@
<td>5</td>
<td><code><span class='Value'>š•—</span><span class='Separator'>,</span><span class='Value'>š•£</span><span class='Separator'>,</span><span class='Value'>š•˜</span></code></td>
</tr>
-<tr>
-<td>Left partial</td>
-<td>6</td>
-<td><code><span class='Value'>š•—</span><span class='Separator'>,</span><span class='Value'>š•£</span></code></td>
-</tr>
-<tr>
-<td>Right partial</td>
-<td>7</td>
-<td><code> <span class='Value'>š•£</span><span class='Separator'>,</span><span class='Value'>š•˜</span></code></td>
-</tr>
</tbody>
</table>
<h2 id="time"><a class="header" href="#time">Time</a></h2>
diff --git a/spec/evaluate.md b/spec/evaluate.md
index a1c4ef43..c991e3c6 100644
--- a/spec/evaluate.md
+++ b/spec/evaluate.md
@@ -49,12 +49,10 @@ In each case the constituent expressions are evaluated in reverse source order:
Modifiers that are evaluated when they receive operands are called *immediate*. Other modifiers, including primitives and some kinds of block, simply record the operands and are called *deferred*. The result of applying a deferred modifier once is called a *derived function*.
-The following rules always create *derived operations*, either 1-modifiers or derived functions. A derived operation is identified by the rule that created it, and the values of its parts.
+The rules for trains create another kind of derived function. A derived function is identified by the rule that created it, and the values of its parts.
| Left | Center | Right | Result
|------------|-----------|-----------------------|--------------
-| | `_mod2_` | `( subject \| Func )` | `{š”½ _C_ R}`
-| `Operand` | `_mod2_` | | `{L _C_ š”½}`
| `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.
+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. 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.
diff --git a/spec/grammar.md b/spec/grammar.md
index b672243e..dfe7f9c2 100644
--- a/spec/grammar.md
+++ b/spec/grammar.md
@@ -24,17 +24,15 @@ Here we define the "atomic" forms of functions and modifiers, which are either s
list = "⟨" ā‹„? ( ( EXPR ā‹„ )* EXPR ā‹„? )? "⟩"
subject = atom | ANY ( "‿" ANY )+
-Starting at the highest-order objects, modifiers have fairly simple syntax. In most cases the syntax for `←` and `↩` is the same, but only `↩` can be used for modified assignment. The export arrow `⇐` can be used in the same ways as `←`, but it can also be used at the beginning of a header to force a namespace result, or with no expression on the right in an `EXPORT` statement.
+Starting at the highest-order objects, modifiers have simple syntax. In most cases the syntax for `←` and `↩` is the same, but only `↩` can be used for modified assignment. The export arrow `⇐` can be used in the same ways as `←`, but it can also be used at the beginning of a header to force a namespace result, or with no expression on the right in an `EXPORT` statement.
ASGN = "←" | "⇐" | "↩"
_m2Expr_ = _mod2_
| _c_ ASGN _m2Expr_
_m1Expr = _mod1
- | _mod2_ ( subject | Func ) # Right partial application
- | Operand _mod2_ # Left partial application
| _m ASGN _m1Expr
-Functions can be formed by fully applying modifiers or as trains. Modifiers are left-associative, so that the left operand (`Operand`) can include modifier applications but the right operand (`subject | Func`) cannot. Trains are right-associative, but bind less tightly than modifiers. Assignment is not allowed in the top level of a train: it must be parenthesized.
+Functions can be formed by applying modifiers, or with trains. Modifiers are left-associative, so that the left operand (`Operand`) can include modifier applications but the right operand (`subject | Func`) cannot. Trains are right-associative, but bind less tightly than modifiers. Assignment is not allowed in the top level of a train: it must be parenthesized.
Derv = Func
| Operand _mod1
diff --git a/spec/system.md b/spec/system.md
index 872126c3..6567f341 100644
--- a/spec/system.md
+++ b/spec/system.md
@@ -198,8 +198,6 @@ Each function in this section is monadic.
| 3-train | 3 | `f,g,h`
| 1-mod | 4 | `š•—,š•£`
| 2-mod | 5 | `š•—,š•£,š•˜`
-| Left partial | 6 | `š•—,š•£`
-| Right partial | 7 | ` š•£,š•˜`
## Time