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 = { let 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 }