clover's git
ix
login
about
branches
tags
log
tree
search
issues (60)
Search
ix
test
behavior
function
pretty
plain
permalink
blame
history
•
15 lines
•
213 B
1
let assertEqual = @extern("assertEqual");
2
3
fn i(x: int) -> int { x }
4
5
fn hello(n: int) -> int {
6
if n > 1 {
7
hello(n - 1) + 1
8
} else {
9
1
10
}
11
}
12
13
fn main {
14
assertEqual(hello(5), i(5));
15
}