From: "David A. Black" Date: 2004-08-03T21:59:57+09:00 Subject: Re: Request for two methods in Array class Hi -- On Tue, 3 Aug 2004, 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: I know I'm being the voice of possibly excessive conservatism here... but I'm just wondering what this method would give us, since we can already do zip+map. As Ara said, it would create one less object. But chaining methods always creates intermediate objects. If zip+map deserves to be combined into a new, single method, what about flatten+map, or compact+map? And then (flatten+map)+compact.... I realize that zip+map is more likely to be actually used, and people have often said they wish zip's block mapped the elements. But I still wonder whether it's worth a new method and method name. David -- David A. Black dblack@wobblini.net