vault backup: 2023-10-06 14:06:29
This commit is contained in:
parent
8ff68b2f15
commit
30bfc996c9
16
.obsidian/workspace.json
vendored
16
.obsidian/workspace.json
vendored
@ -4,16 +4,16 @@
|
|||||||
"type": "split",
|
"type": "split",
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"id": "5e5c298d690b2150",
|
"id": "dad720b6161071b1",
|
||||||
"type": "tabs",
|
"type": "tabs",
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"id": "325e43e04f9c035d",
|
"id": "c542bf78ebad15cb",
|
||||||
"type": "leaf",
|
"type": "leaf",
|
||||||
"state": {
|
"state": {
|
||||||
"type": "markdown",
|
"type": "markdown",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Algo/Séminaire/Exercices seminaire.md",
|
"file": "Algo/Courses/Chapter 6 - Lists (Exercises).md",
|
||||||
"mode": "source",
|
"mode": "source",
|
||||||
"source": false
|
"source": false
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "backlink",
|
"type": "backlink",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Algo/Séminaire/Exercices seminaire.md",
|
"file": "Algo/Courses/Chapter 6 - Lists (Exercises).md",
|
||||||
"collapseAll": false,
|
"collapseAll": false,
|
||||||
"extraContext": false,
|
"extraContext": false,
|
||||||
"sortOrder": "alphabetical",
|
"sortOrder": "alphabetical",
|
||||||
@ -102,7 +102,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "outgoing-link",
|
"type": "outgoing-link",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Algo/Séminaire/Exercices seminaire.md",
|
"file": "Algo/Courses/Chapter 6 - Lists (Exercises).md",
|
||||||
"linksCollapsed": false,
|
"linksCollapsed": false,
|
||||||
"unlinkedCollapsed": true
|
"unlinkedCollapsed": true
|
||||||
}
|
}
|
||||||
@ -125,7 +125,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "outline",
|
"type": "outline",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Algo/Séminaire/Exercices seminaire.md"
|
"file": "Algo/Courses/Chapter 6 - Lists (Exercises).md"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -156,8 +156,9 @@
|
|||||||
"command-palette:Open command palette": false
|
"command-palette:Open command palette": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active": "325e43e04f9c035d",
|
"active": "c542bf78ebad15cb",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
|
"Algo/Séminaire/Exercices seminaire.md",
|
||||||
"Prog/Loops.md",
|
"Prog/Loops.md",
|
||||||
"Algo/CM/CM du 04 octobre.md",
|
"Algo/CM/CM du 04 octobre.md",
|
||||||
"Prog",
|
"Prog",
|
||||||
@ -168,7 +169,6 @@
|
|||||||
"Methodologie/Le cahier des charges.md",
|
"Methodologie/Le cahier des charges.md",
|
||||||
"Methodologie/Gestion.md",
|
"Methodologie/Gestion.md",
|
||||||
"Algo/Courses/Chapter 6 - Lists (Exercises).md",
|
"Algo/Courses/Chapter 6 - Lists (Exercises).md",
|
||||||
"Algo/Séminaire/Exercices seminaire.md",
|
|
||||||
"Algo/Séminaire/Chapter 3 - Case analysis.md",
|
"Algo/Séminaire/Chapter 3 - Case analysis.md",
|
||||||
"Algo/Courses",
|
"Algo/Courses",
|
||||||
"Algo/Séminaire/Chapter 5 - Recursivity.md",
|
"Algo/Séminaire/Chapter 5 - Recursivity.md",
|
||||||
|
@ -54,16 +54,11 @@ let rec nth x n =
|
|||||||
|
|
||||||
## 1.5 - Maximum
|
## 1.5 - Maximum
|
||||||
```Ocaml
|
```Ocaml
|
||||||
let max l =
|
let rec max_value list = match list with
|
||||||
if l = [] then
|
| [] -> failwith "La liste est vide"
|
||||||
0
|
| [x] -> x
|
||||||
else
|
| hd :: tl ->
|
||||||
let maxi = 0
|
let max_tail = max_value tl in
|
||||||
let rec m =
|
if hd > max_tail then hd else max_tail;;
|
||||||
let e::t = l
|
|
||||||
if e >= maxi then
|
|
||||||
maxi = e
|
|
||||||
else
|
|
||||||
m t
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user