2016-08-03 combination Ruby combination 配列から引数n個の要素を選んだときの組合せを出力 array = ["a","b","c","d","e"] p array.combination(2).to_aa~eまでの、5C2の全てのパターンを出力