decl fruit_cost : Fruit -> Int def fruit_cost : fruit = { var fruit_copy = fruit return (match <- fruit_copy with // consuming match | $Banana -> 11 | $Apple | $Orange -> 7) } decl amount_to_string : Int -> Bool -> String def amount_to_string : x is_zero_separated = { const ans = match x with | 0 ? is_zero_separated -> "Zero" | 0 | 1 | 2 | 3 | 4 -> "Few" | x ? (5--9).contains: x -> "Several" | x ? (10--19).contains: x -> "Pack" | _ -> "Lots" return ans }