diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-06-01 17:20:29 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-06-01 17:20:29 -0400 |
| commit | 16ea00650607ba5affc3b94fe133e69920954aa5 (patch) | |
| tree | 07611e8cbce1cfeff91c6c42ff940c6080019b5f /docs/spec/primitive.html | |
| parent | d34927a5589b67c0a73bee42904fffe647b6c534 (diff) | |
Use ; for block valences in reference.bqn where reasonable
Diffstat (limited to 'docs/spec/primitive.html')
| -rw-r--r-- | docs/spec/primitive.html | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/docs/spec/primitive.html b/docs/spec/primitive.html index 95b13735..1f9990a2 100644 --- a/docs/spec/primitive.html +++ b/docs/spec/primitive.html @@ -79,7 +79,7 @@ <ul> <li><strong>Choose</strong> (<code><span class='Modifier2'>◶</span></code>) is later redefined to use the complete <code><span class='Function'>⊑</span></code> rather than the simple version assumed (using this primitive means it's not a true combinator).</li> <li><strong>Constant</strong> (<code><span class='Modifier'>˙</span></code>)</li> -<li><strong>Valences</strong> (<code><span class='Modifier2'>⊘</span></code>) uses a trick with ambivalent <code><span class='Function'>-</span></code> to find out whether there's a left argument, described below.</li> +<li><strong>Valences</strong> (<code><span class='Modifier2'>⊘</span></code>)</li> <li><strong>Right</strong> (<code><span class='Function'>⊢</span></code>)</li> <li><strong>Left</strong> (<code><span class='Function'>⊣</span></code>)</li> <li><strong>Self</strong>/<strong>Swap</strong> (<code><span class='Modifier'>˜</span></code>)</li> @@ -88,7 +88,6 @@ <li><strong>Before</strong>/<strong>Bind</strong> (<code><span class='Modifier2'>⊸</span></code>)</li> <li><strong>After</strong>/<strong>Bind</strong> (<code><span class='Modifier2'>⟜</span></code>)</li> </ul> -<p>The somewhat complicated definition of Valences could be replaced with <code><span class='Brace'>{</span><span class='Function'>𝔽</span><span class='Value'>𝕩</span><span class='Head'>;</span><span class='Value'>𝕨</span><span class='Function'>𝔾</span><span class='Value'>𝕩</span><span class='Brace'>}</span></code> using headers. However, reference.bqn uses a simple subset of BQN's syntax that doesn't include headers. Instead, the definition relies on the fact that <code><span class='Value'>𝕨</span></code> works like <code><span class='Nothing'>·</span></code> if no left argument is given: <code><span class='Paren'>(</span><span class='Number'>1</span><span class='Modifier'>˙</span><span class='Value'>𝕨</span><span class='Paren'>)</span><span class='Function'>-</span><span class='Number'>0</span></code> is <code><span class='Number'>1</span><span class='Function'>-</span><span class='Number'>0</span></code> or <code><span class='Number'>1</span></code> if <code><span class='Value'>𝕨</span></code> is present and <code><span class='Paren'>(</span><span class='Number'>1</span><span class='Modifier'>˙</span><span class='Nothing'>·</span><span class='Paren'>)</span><span class='Function'>-</span><span class='Number'>0</span></code> otherwise: this reduces to <code><span class='Nothing'>·</span><span class='Function'>-</span><span class='Number'>0</span></code> or <code><span class='Number'>0</span></code>.</p> <h3 id="array-properties"><a class="header" href="#array-properties">Array properties</a></h3> <p>The reference implementations extend Shape (<code><span class='Function'>≢</span></code>) to atoms as well as arrays, in addition to implementing other properties. In all cases, an atom behaves as if it has shape <code><span class='Bracket'>⟨⟩</span></code>. The functions in this section never cause an error.</p> <ul> |
