From: Michael Neumann Date: 2004-08-03T18:32:31+09:00 Subject: Re: Request for two methods in Array class Yukihiro Matsumoto wrote: > Hi, > > In message "Request for two methods in Array class" > on 04/08/03, Mike Hall 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: > > * the best name for the behavior. combine sounds nice to me. it "combinates" two or more arrays (or enumerables) into one. but one might argue against combine as name, as it it's not clear that combine returns an array that is not larger than it's arguments joined together. IMO, combine should be equal to zip.map: enum.combine(enum2, enum3,...) { block } # equal enum.zip(enum2, enum3,...).map { block } > * whether it takes only one argument or any number of arguments. many > * whether "multiplication" should be the default. no. default should be "{|arr| arr}" (the default of map) Regards, Michael