repositories
/
cc1516.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
started with new typechecker
[cc1516.git]
/
examples
/
Markus
/
multiple_recursion_values.spl
1
// Do you allow this?
2
// Explain why or why not.
3
4
var ones = 1:ones;
5
6
var flip = 0:flop;
7
var flop = 1:flip;
8
9
// What about this?
10
var flup = (flap.hd):flup;
11
var flap = (flup.hd):flap;
12
13
14
15
// For testing
16
take(n, list)
17
{
18
if( n <= 0 )
19
return [];
20
else
21
return list.hd : take(n-1, list.tl);
22
}
23
24
main() { print(take(10,flip)); }