4 ms·
I'm pretty sure that the words "tail recursion" or "tail call" should appear somewhere in this article - see e.g. https://en.wikipedia.org/wiki/Tail_call https:
by zozbot123 8y ago
I'm pretty sure that the words "tail recursion" or "tail call" should appear somewhere in this article - see e.g. https://en.wikipedia.org/wiki/Tail_call https://en.wikipedia.org/wiki/Tail_call which also explains in a remarkably simple way how tail recursion relates to iterative constructs (as are found, e.g. in Python). Why do people write 'introductory' articles that don't even mention common terminology?
- mwkaufma 8y agoBecause the cost() function OP posted isn't doing tail calls and can't be converted into tail call form.
- ericlippert 8y agoI discuss tail calls in part two. I am often surprised by the number of people who will criticize part one of an article for omitting certain details before reading the second part. Was "part one" unclear in some way?