如何從列表中獲取組合列表?值列表中的組合列表?
例如:
ghci> getCombinations [[1,2,3],[10,20,30],[100,200,300]]
[[1,10,100],[1,10,200],[1,10,300],[1,20,100],[1,20,200],[1,20,300],[1,30,100],
[1,30,200],[1,30,300],[2,10,100],[2,10,200],[2,10,300],[2,20,100],[2,20,200],
[2,20,300],[2,30,100],[2,30,200],[2,30,300],[3,10,100],[3,10,200],[3,10,300],
[3,20,100],[3,20,200],[3,20,300],[3,30,100],[3,30,200],[3,30,300]]
[Calculate n-ary Cartesian Product](http:// stackoverflow .com/questions/3387359/calculate-n-ary-cartesian-product) – 2013-03-07 21:16:21