blob: 02cc710c97312e3552fcf3b38a65ffc22ab8b2f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
|