From: Harrison Reiser Date: 2007-04-09T23:24:43+09:00 Subject: Re: Getting to 100 (#119) On Apr 9, 6:18 am, "Rick DeNatale" wrote: > On 4/8/07, Marcel Ward wrote: > > > On 08/04/07, Carl Porth wrote: > > > After going back and reading the current solutions, I like Ken Bloom's > > > each_partition method. It's much cleaner than my combinations method. > > > I agree, very clean and efficient. The three lines that put it all > > together using #zip are what makes this work for me: > > > Digits.each_partition(Operators.length+1) do |digitspart| > > OperatorPerms.each do |operatorsperm| > > expression=digitspart.zip(operatorsperm).flatten.join > > ... > > > I think I would be feeling very happy if I'd submitted this solution :) > > May I have the temerity to point out that I posted basically the same > solution, which I posted two hours before Ken's. > Indeed! Well, isn't too coincidental after all for me to have used the same mechanism. Great minds must think alike, no? Harrison Reiser