match is Zolo's pattern matching — more powerful than a switch:
match
let day = 3 let name = match day { 1 => "Monday", 2 => "Tuesday", 3 => "Wednesday", 4 => "Thursday", 5 => "Friday", _ => "Weekend", } print(name) // Wednesday
Goal: Use match to classify a score (0-100) into a grade (A, B, C, D, F).
Run the code to see the output
9 results