On Nov 14, 9:33 am, Robert Klemme <shortcut... / googlemail.com> wrote:
> Why do add_suffixes and add_prefixes have to be methods that work on a
> collection instead of a single item?  Do they modify the collection in
> any way or do they need information from other entries to do their
> work on a single entry?

add_prefixes and add_suffixes examine the array; they cannot be
optimized by acting on a single element instead.  I previously called
them transform1 and transform2 in order to emphasize that we can't
assume anything about those methods.

A red herring was thrown into the discussion when I was chided for
calling them transform1 and transform2.  Now that I've changed the
names, another red herring has emerged.

Please, could we resist the temptation to change the example code
based upon assumptions about the given input and methods?  Such
pursuits are not at all relevant.  This is what sidetracked the last
thread.

-FC