8 lines
137 B
Plaintext
8 lines
137 B
Plaintext
|
data List = { Nil, Cons Int List }
|
||
|
defn length l = {
|
||
|
case l of {
|
||
|
Nil -> { 0 }
|
||
|
Cons x xs -> { 1 + length xs }
|
||
|
}
|
||
|
}
|