Merge branch 'main' of https://github.com/Open-Argon/Carbon
This commit is contained in:
10
tests/factorial.ar
Normal file
10
tests/factorial.ar
Normal file
@@ -0,0 +1,10 @@
|
||||
let factorial(x) = do
|
||||
let n = x-1
|
||||
if (n) return x*factorial(n)
|
||||
return 1
|
||||
|
||||
let loop = 501
|
||||
let x = 500
|
||||
while (x) do
|
||||
factorial(loop-x)
|
||||
x=x-1
|
||||
@@ -1,3 +0,0 @@
|
||||
i = 1000000
|
||||
while i:
|
||||
i=i-1
|
||||
3
tests/iteration.ar
Normal file
3
tests/iteration.ar
Normal file
@@ -0,0 +1,3 @@
|
||||
let i = 1e7
|
||||
while (i) do
|
||||
i=i-1
|
||||
Reference in New Issue
Block a user