cond
Multi-branch condition (instead of else if).
Syntax
cond do condition -> ... true -> ... end
Description
cond checks branches in order and runs the first true one. A final true branch acts as 'if none match' (else).
Example
Loading editor…
Expected output
Passed
When to use?
Multi-conditional branching.