On Mon, Feb 21, 2005 at 01:14:00PM -0800, Paul Rubin wrote:
> "markscottwright" <[EMAIL PROTECTED]> writes:
> > But when I try to do it iteratively, it just hangs when I try to
> > evaluate the results (for count > 1):
> >
> > def repeated2(f, count):
> > newfun = f
> > for i in range(coun
markscottwright wrote:
Just for the hell of it, I've been going through the old Scheme-based
textbook "Structure and Interpretation of Computer Programs" and seeing
what I can and can't do with python. I'm trying to create a function
that returns the function (not the results of the function, but
"markscottwright" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Just for the hell of it, I've been going through the old Scheme-based
> textbook "Structure and Interpretation of Computer Programs" and seeing
> what I can and can't do with python. I'm trying to create a function
>
"markscottwright" <[EMAIL PROTECTED]> writes:
> But when I try to do it iteratively, it just hangs when I try to
> evaluate the results (for count > 1):
>
> def repeated2(f, count):
> newfun = f
> for i in range(count-1):
> newfun = lambda x: newfun(f(x))
> return newfun
>
> F
Just for the hell of it, I've been going through the old Scheme-based
textbook "Structure and Interpretation of Computer Programs" and seeing
what I can and can't do with python. I'm trying to create a function
that returns the function (not the results of the function, but a
function object) that