Yoinked a newer GC.

This commit is contained in:
Samuel Hammersberg 2023-05-06 12:47:40 +02:00
parent a388f480e5
commit ab87f7fb15
6 changed files with 1015 additions and 196 deletions

View file

@ -1,8 +1,8 @@
main = for 0 1000
main = for 0 10000
for x n = case n of
0 => 0
n => for (revRange 1000) (n - 1)
n => for ((revRange 10000)) (n - 1)
data List (a) where
Nil : List (a)
@ -11,4 +11,8 @@ data List (a) where
-- create a list of x to 0
revRange x = case x of
0 => Cons x Nil
x => Cons x (revRange (x - 1))
x => Cons x (revRange (x - 1))
sum xs = case xs of
Cons x ys => x + sum ys
Nil => 0