vault backup: 2023-10-30 10:07:22

This commit is contained in:
Louis Gallet 2023-10-30 10:07:22 +01:00
parent 493df09c4f
commit 3f39d3057c
Signed by: lgallet
SSH Key Fingerprint: SHA256:qnW7pk4EoMRR0UftZLZQKSMUImbEFsiruLC7jbCHJAY
2 changed files with 35 additions and 10 deletions

View File

@ -4,22 +4,31 @@
"type": "split", "type": "split",
"children": [ "children": [
{ {
"id": "e2462eca75b6d8bf", "id": "f6fad86667169cdd",
"type": "tabs", "type": "tabs",
"children": [ "children": [
{ {
"id": "f1000ea0f0e6db20", "id": "424b516a4faa9ad5",
"type": "leaf",
"state": {
"type": "empty",
"state": {}
}
},
{
"id": "ab0d8956c63542fc",
"type": "leaf", "type": "leaf",
"state": { "state": {
"type": "markdown", "type": "markdown",
"state": { "state": {
"file": "Algo/Courses/Chapter 6 - Lists.md", "file": "Exam.md",
"mode": "source", "mode": "source",
"source": false "source": false
} }
} }
} }
] ],
"currentTab": 1
} }
], ],
"direction": "vertical" "direction": "vertical"
@ -85,7 +94,7 @@
"state": { "state": {
"type": "backlink", "type": "backlink",
"state": { "state": {
"file": "Algo/Courses/Chapter 6 - Lists.md", "file": "Exam.md",
"collapseAll": false, "collapseAll": false,
"extraContext": false, "extraContext": false,
"sortOrder": "alphabetical", "sortOrder": "alphabetical",
@ -102,7 +111,7 @@
"state": { "state": {
"type": "outgoing-link", "type": "outgoing-link",
"state": { "state": {
"file": "Algo/Courses/Chapter 6 - Lists.md", "file": "Exam.md",
"linksCollapsed": false, "linksCollapsed": false,
"unlinkedCollapsed": true "unlinkedCollapsed": true
} }
@ -125,7 +134,7 @@
"state": { "state": {
"type": "outline", "type": "outline",
"state": { "state": {
"file": "Algo/Courses/Chapter 6 - Lists.md" "file": "Exam.md"
} }
} }
}, },
@ -156,11 +165,12 @@
"command-palette:Open command palette": false "command-palette:Open command palette": false
} }
}, },
"active": "f1000ea0f0e6db20", "active": "ab0d8956c63542fc",
"lastOpenFiles": [ "lastOpenFiles": [
"Exam.md",
"Algo/Courses/Chapter 6 - Lists.md",
"Algo/Courses/Chapter 6 - Lists (Exercises).md", "Algo/Courses/Chapter 6 - Lists (Exercises).md",
"Algo/Courses/Chapter 7 - High Order (exercises).md", "Algo/Courses/Chapter 7 - High Order (exercises).md",
"Algo/Courses/Chapter 6 - Lists.md",
"Algo/Séminaire/Chapter 1 - CAML basics.md", "Algo/Séminaire/Chapter 1 - CAML basics.md",
"Algo/CM/CM du 04 octobre.md", "Algo/CM/CM du 04 octobre.md",
"Code CAML.md", "Code CAML.md",
@ -201,7 +211,6 @@
"Pasted image 20230912155138.png", "Pasted image 20230912155138.png",
"Algo/Chapter 0 - A bit of imperative/0.1 - Print.md", "Algo/Chapter 0 - A bit of imperative/0.1 - Print.md",
"Algo/Séminaire/Untitled", "Algo/Séminaire/Untitled",
"Mathématiques/Séminaire/Logics/Logics.md",
"Algo/Chapter 0 - A bit of imperative", "Algo/Chapter 0 - A bit of imperative",
"Algo/Séminaire/assets/69E2987C-209A-48CD-8964-5A60462966E5.jpg", "Algo/Séminaire/assets/69E2987C-209A-48CD-8964-5A60462966E5.jpg",
"Untitled.canvas" "Untitled.canvas"

16
Exam.md Normal file
View File

@ -0,0 +1,16 @@
## Multiple insertion
```Ocaml
let insert_mult n x lst =
if n <= 0 then
invalid_arg "insert_mult: n must be > 0"
else
match lst with
| [] -> []
| z::f ->
let aux count = function
| [] -> x
| e::t ->
if (count = n) then
e :: x :: t
else aux (count + 1) t
in aux 1 t