Add some basic programs
This commit is contained in:
parent
fbbb4185ba
commit
15fda4ea97
|
@ -0,0 +1,2 @@
|
||||||
|
data Bool = { True, False }
|
||||||
|
data IntList = { Nil, Cons(Int, IntList) }
|
|
@ -0,0 +1,6 @@
|
||||||
|
defn length l = {
|
||||||
|
case l of {
|
||||||
|
Nil -> { 0 }
|
||||||
|
Cons(x, xs) -> { 1 + length xs }
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
defn not b = {
|
||||||
|
case b of {
|
||||||
|
False -> { True }
|
||||||
|
True -> { False }
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue