vault backup: 2023-09-25 14:29:27

This commit is contained in:
Louis Gallet 2023-09-25 14:29:27 +02:00
parent 7f3dd95837
commit e03032f741
Signed by: lgallet
SSH Key Fingerprint: SHA256:qnW7pk4EoMRR0UftZLZQKSMUImbEFsiruLC7jbCHJAY

View File

@ -444,14 +444,12 @@ $$
$$
= O(log(n))
$$
## 4.12 - Prime number
## Exercise 4.12 - Prime number
```Ocaml
let prime n =
if n < 1 then
invalid_args "n should not be inferior to zero"
else if n mod 2 = 0 then
false
else
let rec p n =
if n = 0 then
1
else