1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/* Test grade function with comparison patterns */ grade : score -> when score is score >= 90 then "A" score >= 80 then "B" score >= 70 then "C" _ then "F"; result1 : grade 95; result2 : grade 85; result3 : grade 65; ..out result1; ..out result2; ..out result3;