const -> let

This commit is contained in:
ProgramSnail 2023-07-03 19:05:50 +03:00
parent 3ae6ed079d
commit 189306df26
33 changed files with 406 additions and 285 deletions

View file

@ -8,7 +8,7 @@ def fruit-cost : fruit = {
decl amount-to-string : \int -> \bool -> \string
def amount-to-string : x is-zero-separated = {
const ans = match x with
let ans = match x with
| 0 ?? is-zero-separated -> "Zero"
| 0 | 1 | 2 | 3 | 4 -> "Few"
| x ?? (5--9)..contains: x -> "Several"