Matzにっき(2008-03-03) [言語] CS 11: Python track: python idioms

screenshot

で、Rubyのメソッドチェーンではこのような複数シーケンスの ネストしたループをストレートに書くことができないことに気がついた。 (1..2).xxxx(1..2) で、 [1,1],[1,2],[2,1],[2,2] を返すようなxxxxメソッドがあれば、 (1..10).xxxx(1..10).select{|x,y| x+y == 5}.select{|x,y|x > y} と書けるんだけど、名前がな。いい名前ないかな。 _ [Ruby] Binary search algorithm - Wikipedia, the free encyclopedia Rubyのオブジェクト...

http://www.rubyist.net/~matz/20080303.html#p01
http://b.hatena.ne.jp/entry/http://www.rubyist.net/~matz/20080303.html#p01