10 lines
229 B
Plaintext
10 lines
229 B
Plaintext
data List = { Nil, Cons Int List }
|
|
data Bool = { True, False }
|
|
defn length l = {
|
|
case l of {
|
|
Nil -> { 0 }
|
|
Cons x xs -> { 1 + length xs }
|
|
}
|
|
}
|
|
defn main = { length (Cons True (Cons False (Cons True Nil))) }
|