Whoa! Do Python and Lisp really have LAMBDA ?

Juliusz Chroboczek jch at pps.jussieu.fr
Thu Oct 30 14:32:25 EST 2003


| (loop for f in flist 
|       collect (funcall f 1))
| 
| I got (4 4 4).

RW> Why should this be considered a "gotcha"?

Because it is?  The loop/collect idiom has a mostly functional feel to
it, while it is implemented imperatively.

It's an issue that becomes transparent once you become used to Common
Lisp, just like the semantic difference between DO in CL and in Scheme.
But it's still an issue.

Followups restricted.

                                        Juliusz






More information about the Python-list mailing list