vault backup: 2023-10-16 15:07:24

This commit is contained in:
Louis Gallet 2023-10-16 15:07:24 +02:00
parent f625d132c9
commit a0ba6c4c75
Signed by: lgallet
SSH Key Fingerprint: SHA256:qnW7pk4EoMRR0UftZLZQKSMUImbEFsiruLC7jbCHJAY
2 changed files with 8 additions and 10 deletions

View File

@ -81,8 +81,7 @@
} }
], ],
"direction": "horizontal", "direction": "horizontal",
"width": 300, "width": 300
"collapsed": true
}, },
"right": { "right": {
"id": "b83c16dd7908c658", "id": "b83c16dd7908c658",

View File

@ -246,11 +246,10 @@ val shard = 'a list -> 'a list -> 'a list -> 'a list = <fun>
## Exercise 5.1 ## Exercise 5.1
```Ocaml ```Ocaml
let assos k l = let assos k = function
if (k < 0) then [] -> failwith "not found"
invalid_arg "k not natural" | (k2, v2)::t when k2 = k -> v2
else | (k2, v2):: t when k < k2 -> faiwith "not found"
match l with | e::t -> assoc k t
| -> failwith "not found" val assos = 'a -> ('a + 'b) list -> 'b = <fun>
| (k,y)::t -> y ```
| _ -> assos k t