"Yukihiro Matsumoto" <matz / ruby-lang.org> wrote in message
news:1091510011.625923.536.nullmailer / picachu.netlab.jp...
> Hi,
>
> In message "Request for two methods in Array class"
>     on 04/08/03, Mike Hall <mghallNO / SPAMenteract.com> writes:
>
> |1. A new method, Array.combine  (needs a better name for general use).
> |   It takes entries from two (or many) arrays and combines them.
> |   (like a combination of Array.zip, fetch, and map)
>
> Sounds nice.  But I'm not sure "combine" is a proper name for the
> method.   We need more discussion, for example:
>

Hi Matz !

I'm using Ruby 1.6.8.
Maybe my suggestions are already part of some later version,
or can be upgraded to some more fittable behaviour.

>   * the best name for the behavior.

--> match

>   * whether it takes only one argument or any number of arguments.

--> one or more

>   * whether "multiplication" should be the default.
>

If no (or an empty) block is given, what would be the most common way to
'match' array elements ?
Regarding to Sean O'Dells 'weave example', I think it's like this:

natural = [1,2,3]
odd = [1,3,5]
even = [2,4,6]

matched = natural.match(odd,even)
matched #=> [[1, 1, 2], [2, 3, 4], [3, 5, 6]]


Greetings,
Chris

<snip>