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

> It turns out that most recursive functions can be reworked into the tail-call form.

This statement in the beginning is not entirely correct. A more accurate statement would be that all recursive programs that are _iterative_ (if they are loops in disguise), can be rewritten in a tail-call form. That is, there must be a single chain of function calls.

The inherently recursive procedures cannot be converted into a tail-call form.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: