On Thu, Mar 31, 2011 at 12:30 PM, Peter Hull <[email protected]> wrote:
> Probably everyone's seen this by now but Chris Double has posted on his blog:
> http://www.bluishcoder.co.nz/2011/03/31/a-quick-look-at-the-rust-programming-language.html#
Just on his factorial example:
fn fac(uint x) -> uint {
if (x <= 1u) {
ret 1u;
}
else {
ret x * fac(x-1u);
}
}
Should he use 'be' instead of the second 'ret' or can rustc detect
tail-recursion automatically now?
Pete
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev