2019-07-27 00:54:25 +03:00
|
|
|
//@ run-pass
|
2018-03-16 11:42:42 -07:00
|
|
|
//@ ignore-emscripten apparently blows the stack
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2015-03-25 17:06:52 -07:00
|
|
|
fn f(x: isize) -> isize {
|
|
|
|
if x == 1 { return 1; } else { let y: isize = 1 + f(x - 1); return y; }
|
2010-06-23 21:03:09 -07:00
|
|
|
}
|
|
|
|
|
2015-06-07 21:00:38 +03:00
|
|
|
pub fn main() { assert_eq!(f(5000), 5000); }
|