vault backup: 2023-10-25 16:38:15
This commit is contained in:
parent
effbfd24cc
commit
a397067481
@ -1,2 +1,8 @@
|
|||||||
```Ocaml
|
```Ocaml
|
||||||
# let double_succ
|
# let sum n =
|
||||||
|
if n = 0 then
|
||||||
|
0
|
||||||
|
else if n < 0 then
|
||||||
|
failwith "input must be positive"
|
||||||
|
else
|
||||||
|
n + sum(n-1)
|
Loading…
x
Reference in New Issue
Block a user