Hooked the GC back in B)

This commit is contained in:
Samuel Hammersberg 2023-05-05 18:50:05 +02:00
parent dead9eb75a
commit a388f480e5
24 changed files with 1404 additions and 227 deletions

View file

@ -2,7 +2,7 @@ main = for 0 1000
for x n = case n of
0 => 0
n => for (revRange 1000) (n + minusOne)
n => for (revRange 1000) (n - 1)
data List (a) where
Nil : List (a)
@ -11,8 +11,4 @@ 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 + minusOne))
-- represents minus one :)
minusOne : Int ;
minusOne = 9223372036854775807 + 9223372036854775807 + 1;
x => Cons x (revRange (x - 1))