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

Isn't recursion exactly that? A loop that feeds into the next iteration.


It's important to differentiate between tail-recursive functions and non-tail-recursive functions. Compilers will often convert tail-recursive functions into their iterative counterparts. See: https://en.wikipedia.org/wiki/Tail_call

In contrast, non-tail-recursive functions will make the call stack grow with each call.


They both fit the description in GP.

"The results of each iteration are fed into the next iteration, until no new result is produced."




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: