vault backup: 2023-10-25 17:52:21

This commit is contained in:
Louis Gallet 2023-10-25 17:52:21 +02:00
parent c5a1ad6716
commit f521e9413d
Signed by: lgallet
SSH Key Fingerprint: SHA256:qnW7pk4EoMRR0UftZLZQKSMUImbEFsiruLC7jbCHJAY

View File

@ -46,3 +46,14 @@ val for_all: ('a -> bool) -> 'a list -> bool = <fun>
| [] -> true | [] -> true
| e::t -> p e || for_all p t;; | e::t -> p e || for_all p t;;
val exists: ('a -> bool) -> 'a list -> bool = <fun> val exists: ('a -> bool) -> 'a list -> bool = <fun>
```
## Ex 2.4
```
# let rec find p = function
| [] -> true
| e::t -> if p e then e else find p t;;
val exists: (bool -> bool) -> bool list -> bool = <fun>
```
## Ex 2.5