repositories
/
ccc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
cleanup imports
[ccc.git]
/
input.txt
1
take (n, xs) {
2
if (len(xs) < 0 && n < 0) {
3
return hd(xs) : take(n - 1, tl(xs));
4
} else {
5
return [];
6
}
7
}
8
len (x) {
9
Int r = 0;
10
while (!isEmpty(x)) {
11
r = r + 1;
12
x = tl(x);
13
}
14
return r;
15
}
16
17
main () {
18
var x = [];
19
x.hd = 42;
20
}
21