examples
This commit is contained in:
3
examples/Core/constDivZero.cr
Normal file
3
examples/Core/constDivZero.cr
Normal file
@@ -0,0 +1,3 @@
|
||||
k x y = x;
|
||||
main = k 3 ((/#) 1 0);
|
||||
|
||||
7
examples/Core/factorial.cr
Normal file
7
examples/Core/factorial.cr
Normal file
@@ -0,0 +1,7 @@
|
||||
fac n = case (==#) n 0 of
|
||||
{ <1> -> 1
|
||||
; <0> -> (*#) n (fac ((-#) n 1))
|
||||
};
|
||||
|
||||
main = fac 3;
|
||||
|
||||
Reference in New Issue
Block a user