Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #94708

Re: Another tail recursion example

From Paul Rubin <no.email@nospam.invalid>
Newsgroups comp.lang.python
Subject Re: Another tail recursion example
Date 2015-07-28 14:30 -0700
Organization A noiseless patient Spider
Message-ID <874mkootqo.fsf@jester.gateway.sonic.net> (permalink)
References <87bnewott4.fsf@jester.gateway.sonic.net>

Show all headers | View raw


Paul Rubin <no.email@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 ;-).

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Another tail recursion example Paul Rubin <no.email@nospam.invalid> - 2015-07-28 14:28 -0700
  Re: Another tail recursion example Paul Rubin <no.email@nospam.invalid> - 2015-07-28 14:30 -0700
  Re: Another tail recursion example Terry Reedy <tjreedy@udel.edu> - 2015-07-28 22:47 -0400

csiph-web