16 lines
264 B
Text
16 lines
264 B
Text
|
|
alias if2(cond1:Bool,
|
||
|
|
cond2:Bool,
|
||
|
|
both,
|
||
|
|
first,
|
||
|
|
second,
|
||
|
|
neither)
|
||
|
|
{
|
||
|
|
var res1 = cond1;
|
||
|
|
var res2 = cond2;
|
||
|
|
|
||
|
|
if (res1 and res2) return both;
|
||
|
|
if (res1) return first;
|
||
|
|
if (res2) return second;
|
||
|
|
return neither;
|
||
|
|
}
|