vault backup: 2023-10-06 15:32:02
This commit is contained in:
@ -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 =
|
||||
|
|
||||
|
||||
|
Reference in New Issue
Block a user