vault backup: 2023-10-09 13:48:31

This commit is contained in:
Louis Gallet 2023-10-09 13:48:31 +02:00
parent c2017e86b9
commit 47b63721c2
Signed by: lgallet
SSH Key Fingerprint: SHA256:qnW7pk4EoMRR0UftZLZQKSMUImbEFsiruLC7jbCHJAY
2 changed files with 14 additions and 12 deletions

View File

@ -13,7 +13,7 @@
"state": {
"type": "markdown",
"state": {
"file": "Algo/Courses/Chapter 6 - Lists (Exercises).md",
"file": "Algo/Courses/Chapter 6 - Lists.md",
"mode": "source",
"source": false
}
@ -85,7 +85,7 @@
"state": {
"type": "backlink",
"state": {
"file": "Algo/Courses/Chapter 6 - Lists (Exercises).md",
"file": "Algo/Courses/Chapter 6 - Lists.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
@ -102,7 +102,7 @@
"state": {
"type": "outgoing-link",
"state": {
"file": "Algo/Courses/Chapter 6 - Lists (Exercises).md",
"file": "Algo/Courses/Chapter 6 - Lists.md",
"linksCollapsed": false,
"unlinkedCollapsed": true
}
@ -125,7 +125,7 @@
"state": {
"type": "outline",
"state": {
"file": "Algo/Courses/Chapter 6 - Lists (Exercises).md"
"file": "Algo/Courses/Chapter 6 - Lists.md"
}
}
},
@ -158,9 +158,9 @@
},
"active": "eaf65669cfff2a2c",
"lastOpenFiles": [
"Algo/Courses/Chapter 6 - Lists (Exercises).md",
"Algo/Courses/Chapter 6 - Lists.md",
"Algo/Courses/Untitled.md",
"Algo/Courses/Chapter 6 - Lists (Exercises).md",
"Algo/Séminaire/Exercices seminaire.md",
"Prog/Loops.md",
"Algo/CM/CM du 04 octobre.md",

View File

@ -134,10 +134,12 @@ let concatenate_lists lst1 lst2 =
## Exercise 3.1
```Ocaml
let growing i =
if i = [] then false
else
let rec grow =
let e::t = i in
let test = e in
if e
let rec growing = function
| [] | [_] -> true
| x :: y :: rest -> if x <= y then growing (y :: rest) else false;;
```
## Exercise 3.2
```
let rec delete x = function
| e::i -> if x == e then