From: James Edward Gray II Date: 2006-01-08T03:53:31+09:00 Subject: Re: Iterator Fu Failing Me On Jan 7, 2006, at 7:33 AM, Robert Klemme wrote: > elements = tokens.map do |tok| > parsers.inject(false) {|a,par| a=par.parse(tok) and break a} > end That's what I was looking for. Thank you. > But the best solution is > > elements = tokens.map do |tok| > parsers.detect {|par| par.parse(tok)} > end That's not equivalent. It's actually the same example I showed in my original question message that didn't work. See that post for details, but the short story is that it finds the parsers that did the conversion, not the parsed elements I was looking for. James Edward Gray II