From: dblack@... Date: 2002-09-24T22:25:07+09:00 Subject: Re: select and select Hi -- On Tue, 24 Sep 2002, Gavin Sinclair wrote: > Hashes and arrays map keys to values. The method we are looking for > returns several values based on several keys. I think I mentioned the following idea before, but I don't remember any response to it (and I'm kind of warming to it :-). Namely: Enumerable#find_at It has the following going for it, in my opinion: 1. it has "at" in it (see my last post for why I like "at" more than verbs) 2. it makes a nice set with #find and #find_all: a = %w{one two three four} a.find {|e| e[0] == ?t} # "two" a.find_all {|e| e.size > 3} # ["three", "four"] a.find_at(0,2) # ["one", "three"] 3. it doesn't already exist :-) David -- David Alan Black | Register for RubyConf 2002! home: dblack@candle.superlink.net | November 1-3 work: blackdav@shu.edu | Seattle, WA, USA Web: http://pirate.shu.edu/~blackdav | http://www.rubyconf.com