vault backup: 2023-10-20 14:32:32
This commit is contained in:
parent
317aabbcdc
commit
cc0448ac27
@ -266,3 +266,13 @@ let assoc k l =
|
||||
in findkey l;;
|
||||
val assoc: int -> (int * 'a)list -> 'a = <fun>
|
||||
```
|
||||
|
||||
## Exercise 5.2
|
||||
```Ocaml
|
||||
let rec flattten = function
|
||||
| [] -> []
|
||||
| e::t -> (match e with
|
||||
| [] -> flatten t
|
||||
| e2::t2 -> e2==flatten(2::t));;
|
||||
|
||||
val flatten: 'a list list -> 'a list = <fun>
|
||||
|
Loading…
x
Reference in New Issue
Block a user