mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-15 19:38:44 +00:00
const -> let
This commit is contained in:
parent
3ae6ed079d
commit
189306df26
33 changed files with 406 additions and 285 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue