[Python-Dev] PEP 201 - Parallel iteration
Tue, 18 Jul 2000 00:05:06 +0200 (CEST)
Peter Schneider-Kamp wrote:
> > Looking at the examples for this builtin function, and without thinking
> > too much about the name, I'd call it - fold().
> Please, don't!!! As far as I can remember, fold is the "reduce of the
> functional languages". At least it is that in Haskell.
> Here's a quote from the Journal of Functional Programming (July 1999):
> "In functional programming, fold is a standard operator that
> encapsulates a simple pattern of recursion for processing lists."
Okay, but weren't we paying less attention to historical facts in language
design? Guido regrets map() that slipped through, for instance.
My opinion is a newbie opinion. I just can't believe that we can't find
a more intuitive name for this function!
From what I read in the PEP, several sequences are folded element-wise
into one sequence, with optional padding. And that's all! Since it's a
builtin function, it should make sense in contexts other than parallel
What's the problem with `folding' sequences element-wise in Python?
What's the problem with `zipping' sequences element-wise in Python?
Which one of the 2 questions above makes more sense?
Vladimir MARANGOZOV | Vladimir.Marangozov@inrialpes.fr
http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252