vault backup: 2023-10-06 15:32:02

This commit is contained in:
Louis Gallet 2023-10-06 15:32:02 +02:00
parent aa40e475bc
commit 9fff9089fa
Signed by: lgallet
SSH Key Fingerprint: SHA256:qnW7pk4EoMRR0UftZLZQKSMUImbEFsiruLC7jbCHJAY
2 changed files with 26 additions and 6 deletions

View File

@ -10,6 +10,18 @@
{
"id": "c542bf78ebad15cb",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "Algo/Courses/Chapter 6 - Lists.md",
"mode": "source",
"source": false
}
}
},
{
"id": "eaf65669cfff2a2c",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
@ -19,7 +31,8 @@
}
}
}
]
],
"currentTab": 1
}
],
"direction": "vertical"
@ -156,19 +169,19 @@
"command-palette:Open command palette": false
}
},
"active": "c542bf78ebad15cb",
"active": "eaf65669cfff2a2c",
"lastOpenFiles": [
"Algo/Courses/Chapter 6 - Lists.md",
"Algo/Courses/Chapter 6 - Lists (Exercises).md",
"Algo/Séminaire/Exercices seminaire.md",
"Prog/Loops.md",
"Algo/CM/CM du 04 octobre.md",
"Prog",
"Algo/CM/CM du 27 septembre.md",
"Algo/Séminaire/Remediation.md",
"Algo/Courses/Chapter 6 - Lists.md",
"Methodologie/Communication.md",
"Methodologie/Le cahier des charges.md",
"Methodologie/Gestion.md",
"Algo/Courses/Chapter 6 - Lists (Exercises).md",
"Algo/Séminaire/Chapter 3 - Case analysis.md",
"Algo/Courses",
"Algo/Séminaire/Chapter 5 - Recursivity.md",

View File

@ -103,6 +103,13 @@ val nth 'a list -> int -> 'a = <fun>
## Exercise 2.1
```
let rec arith_list n a r =
let arith_list n a r =
if n < 0 then
invalid_arg "n must be superior to 0"
else if n = 0 then
[]
if n = 1 then
a::[]
else let rec arl =
|