Re: small challenge : limit((x+1)**0.5 for x in itially(2))

2006-04-05 Thread Paul McGuire
"Azolex" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > generators challenge > > > define "limit" and "itially" > > so that > > limit(foo(x) for x in itially(bar)) > > works out the same as > > limit2(foo,bar) > > with > > def limit2(foo,bar) : >

Re: small challenge : limit((x+1)**0.5 for x in itially(2))

2006-04-05 Thread Azolex
Azolex wrote: > generators challenge > > > define "limit" and "itially" > > so that > > limit(foo(x) for x in itially(bar)) > > works out the same as > > limit2(foo,bar) > > with > > def limit2(foo,bar) : > bar1 = foo(bar) > while bar != bar1

small challenge : limit((x+1)**0.5 for x in itially(2))

2006-04-05 Thread Azolex
generators challenge define "limit" and "itially" so that limit(foo(x) for x in itially(bar)) works out the same as limit2(foo,bar) with def limit2(foo,bar) : bar1 = foo(bar) while bar != bar1 : bar1,bar = foo(bar),bar1