mirror of
https://github.com/anoma/juvix.git
synced 2024-12-12 14:28:08 +03:00
11 lines
147 B
Plaintext
11 lines
147 B
Plaintext
|
-- recursion
|
||
|
module test008;
|
||
|
|
||
|
import Stdlib.Prelude open;
|
||
|
|
||
|
sum : Nat → Nat
|
||
|
| zero := 0
|
||
|
| (suc x) := suc x + sum x;
|
||
|
|
||
|
main : Nat := sum 10000;
|