repo.or.cz
/
prop.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
initial
[prop.git]
/
tools
/
demos
/
list.pcc
blob
b04678578e4602a265899665bd8a61b82038133b
1
datatype List = nil | cons(int,List);
2
3
int length(List l)
4
{ match (l) {
5
case nil: return 0;
6
case cons(_,l): return 1 + length(l);
7
}
8
}