Skip to content

Instantly share code, notes, and snippets.

@keigoi keigoi/
Created Oct 26, 2012

What would you like to do?
Rust tail call test
// use tail-call only, but stack overflow occur
fn recur(i : int) {
if i!=0 {
fn main() {
// Result ----
// rust: task 7f99a2d00220 ran out of stack
// rust: domain main @0x7f99a3800010 root task failed

This comment has been minimized.

Copy link
Owner Author

keigoi commented Oct 26, 2012

rust -O will do TCO!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.