Another tail recursion example

Paul Rubin no.email at nospam.invalid
Tue Jul 28 17:30:23 EDT 2015


Paul Rubin <no.email at nospam.invalid> writes:
> Chris Angelico was asking for examples of tail recursion that didn't
> have obvious looping equivalents.  Here's an Euler problem solution
> using memoization and (except that Python doesn't implement it) tail
> recursion with an accumulator.

Actually that's wrong, it's not really tail recursive because of the
addition in the memo combinator, whoops ;-).



More information about the Python-list mailing list