1
0
dust/examples/match.ds

13 lines
171 B
Plaintext
Raw Normal View History

2024-01-01 12:46:47 +00:00
foo_or_bar = match random:boolean() {
2023-12-11 15:18:46 +00:00
true => "foo"
false => "bar"
}
2024-01-01 12:46:47 +00:00
num = match random:integer() {
2023-12-11 15:18:46 +00:00
1 => "one",
2 => { "two" },
* => "neither",
}
[foo_or_bar, num]