Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Scala compiles direct tail recursion the a jump to the start of the function (jumps within a method are possible on the JVM) without any trampoline.

So @tailrec tells the compiler to compile this call to an unconditional jump.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: