aboutsummaryrefslogtreecommitdiff
path: root/doc/block.md
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-11-18 22:10:59 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-11-18 22:10:59 -0500
commite7f09d54e76d61709763dcaf1b3081812d88fe46 (patch)
treedb3a336c207bbfd34bf09e8e2f1ea2ccfa12e7e2 /doc/block.md
parente42111e4dfc2fac9f99b053fd3cd65cd6e11259f (diff)
Move introduction of the optional-function rule to main header section, not multiple bodies
Diffstat (limited to 'doc/block.md')
-rw-r--r--doc/block.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/block.md b/doc/block.md
index e4d32fa4..9e436490 100644
--- a/doc/block.md
+++ b/doc/block.md
@@ -157,6 +157,8 @@ Any element of a function or modifier header can be left nameless by using the c
The name `𝕨` in this context can refer to either a left argument or no left argument, allowing a header with arguments to be used even for an ambiguous function. Recall that `𝕨` is the only token other than `Β·` that can have no value. If an identifier or list is given as the left argument, then the function must be called with a left argument.
+If a header consists of `π•Š` with one argument, like `π•Š aβ€Ώb:` or `π•Šπ•©:`, the `π•Š` can be left off. See [case headers](#case-headers) below for examples. The exception is if the argument is a plain name, as in `π•Š arg:`, because the header `arg:` is a label for an immediate block as described in the next section.
+
### Short headers
A header can also be a plain name with no inputs, called a *label*. A label specifies the type of the block and gives an internal name that can be used to refer to it, but doesn't specify the inputs.
@@ -198,7 +200,7 @@ If no header is compatible, the call results in an error.
### Case headers
-A special rule allows for convenient case-matching syntax for one-argument functions. In any function header with one argument, the function name can be omitted as long as the argument is *not* a plain identifierβ€”it must be `𝕩` or a compound value like a list to distinguish it from an immediate block label.
+The optional `π•Š` rule makes for convenient case-matching syntax in one-argument functions.
Test ← {
"abc": "string" ;