Sonolus Wiki

SwitchWithDefault

Conditionally execute a branch.

Arguments

ArgumentDescription
discriminantDiscriminant
test_0Branch 0 test
consequent_0Branch 0 consequent
test_1Branch 1 test
consequent_1Branch 1 consequent
test_2Branch 2 test
consequent_2Branch 2 consequent
......
consequent_defDefault consequent

Return

consequent_n of branch where discriminant equals to test_n, or consequent_def if no branch matches.