vault backup: 2023-10-30 11:04:57
This commit is contained in:
parent
3befd5bcb4
commit
65fd6fdd02
2
.obsidian/workspace.json
vendored
2
.obsidian/workspace.json
vendored
@ -157,7 +157,7 @@
|
|||||||
"command-palette:Open command palette": false
|
"command-palette:Open command palette": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active": "ab0d8956c63542fc",
|
"active": "c473a791e2b34194",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
"Exam.md",
|
"Exam.md",
|
||||||
"Algo/Courses/Chapter 6 - Lists.md",
|
"Algo/Courses/Chapter 6 - Lists.md",
|
||||||
|
14
Exam.md
14
Exam.md
@ -1,8 +1,14 @@
|
|||||||
## Multiple insertion
|
## Multiple insertion
|
||||||
```
|
```
|
||||||
# let split sep = function
|
# let rec split sep lst =
|
||||||
| [] -> []
|
let rec aux acc current = function
|
||||||
| e::t ->
|
| [], [] -> acc
|
||||||
let aux
|
| [], tail -> current :: acc
|
||||||
|
| x::xs, _ ->
|
||||||
|
if sep x then
|
||||||
|
aux (current::acc) [] (xs, [])
|
||||||
|
else aux acc (x :: current) (xs, current)
|
||||||
|
in aux [] [] (lst, [])
|
||||||
|
val split: ('a -> bool) -> 'a list -> 'a list list = <fun>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user