
July 29, 2006
11:56 a.m.
On 29 Jul 2006 at 12:00, edu-sig-request@python.org wrote:
From: John Zelle <john.zelle@wartburg.edu> Subject: Re: [Edu-sig] digits of pi
Here's a generator I coded up based on a paper by Gibbons: http://web.comlab.ox.ac.uk/oucl/work/jeremy.gibbons/publications/spigot.pdf
It's simple to code, but I think you have to read the paper to figure out what it's doing. (I just translated some code, so I really can't tell you :-) In the paper, this was done in a lazy functional language. I was mostly interested to see how it would translate to a Python generator.
Are both things: Python generators and lazy evaluation, two different tools that solve the same domain of problems? Daniel