5 ms·
Honest question: when are loops not replacement for recursion? My (admittedly naive) mental model of recursion is basically a loop where you bring your entire
by pasabagi 7y ago
Honest question: when are loops not replacement for recursion?
My (admittedly naive) mental model of recursion is basically a loop where you bring your entire stack frame with you (or less, in the case of tail recursion).