vault backup: 2023-10-06 15:32:02

This commit is contained in:
2023-10-06 15:32:02 +02:00
parent aa40e475bc
commit 9fff9089fa
2 changed files with 26 additions and 6 deletions

View File

@ -103,6 +103,13 @@ val nth 'a list -> int -> 'a = <fun>
## Exercise 2.1
```
let rec arith_list n a r =
let arith_list n a r =
if n < 0 then
invalid_arg "n must be superior to 0"
else if n = 0 then
[]
if n = 1 then
a::[]
else let rec arl =
|