From: Marcel Ward Date: 2007-04-09T12:21:25+09:00 Subject: Re: Getting to 100 (#119) 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 :) -- Marcel