lily/programs/length.lily

7 lines
104 B
Plaintext
Raw Normal View History

2019-06-04 17:12:24 -07:00
defn length l = {
case l of {
Nil -> { 0 }
Cons(x, xs) -> { 1 + length xs }
}
}