rc #13

Merged
crumbtoo merged 196 commits from dev into main 2024-02-13 13:22:23 -07:00
4 changed files with 11 additions and 10 deletions
Showing only changes of commit 6dd581a25f - Show all commits

View File

@@ -1,3 +0,0 @@
k x y = x;
main = k 3 ((/#) 1 0);

View File

@@ -1,7 +0,0 @@
fac n = case (==#) n 0 of
{ <1> -> 1
; <0> -> (*#) n (fac ((-#) n 1))
};
main = fac 3;

11
examples/rlp/SumList.rl Normal file
View File

@@ -0,0 +1,11 @@
data List a = Nil | Cons a (List a)
foldr :: (a -> b -> b) -> b -> List a -> b
foldr f z l = case l of
Nil -> z
Cons a as -> f a (foldr f z as)
list = Cons 1 (Cons 2 (Cons 3 Nil))
main = foldr f 0 list