aboutsummaryrefslogtreecommitdiff
path: root/help/nextbody.md
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-01-28 20:56:46 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-01-28 21:02:27 -0500
commit9cfc45f731a121282f47218d6ab80c5b9b06e277 (patch)
treee5934a40c9c3e94651d767472369bfa7a38113f3 /help/nextbody.md
parent0c716e4c6b7c2c44bbfd02b6503cae66af7b7480 (diff)
Add ;:? to keybar and help
Diffstat (limited to 'help/nextbody.md')
-rw-r--r--help/nextbody.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/help/nextbody.md b/help/nextbody.md
new file mode 100644
index 00000000..02cc710c
--- /dev/null
+++ b/help/nextbody.md
@@ -0,0 +1,16 @@
+*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/nextbody.html).*
+
+# Semicolon (`;`)
+
+## `;`: Next Body
+[→full documentation](../doc/block.md#multiple-bodies)
+
+End the current block body and start a new one. [Headers](header.md) (`:`) and [predicates](predicate.md) (`?`) can control which body is evaluated. A function can have two headers without these, indicating the monadic and dyadic cases.
+
+ 3 { 𝕩÷2 ; -𝕨‿𝕩 } 4 # Monadic and dyadic cases
+
+ F ← {𝕊a‿b: a-b; 𝕊a‿b‿c: b+c}
+
+ F 5‿2 # Matches first header
+
+ F 1‿3‿6 # Matches second header