On 2020-12-18, Joe Pfeiffer <pfeif...@cs.nmsu.edu> wrote:

> Recursion has very limited application, but where it's the right
> tool it's invaluable (top-down parsers, some graph algorithms...).
> We teach it primarily because by the time a student has a good
> handle on how to write a recursive function they understand
> functions in general really well.

Yep, there are definitly cases where it's pretty much the only right
answer. If you try to avoid it, you end up writing what turns into a
simulation of recursion -- and doing that correctly isn't easy.

--
Grant




-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to