case Expr of
Pattern1 [when Guard1] -> Seq1;
Pattern2 [when Guard2] -> Seq2;
...
PatternN [when GuardN] -> SeqN
end
首先,对Expr求值,然后,Expr的值将依次与模式Pattern1、Pattern2……
case Expr of
Pattern1 [when Guard1] -> Seq1;
Pattern2 [when Guard2] -> Seq2;
...
PatternN [when GuardN] -> SeqN
end
首先,对Expr求值,然后,Expr的值将依次与模式Pattern1、Pattern2……