私はこのコードを持っています、それは繰り返しのない組み合わせの式です:
combinaciones :: Int ->[Int]->[[Int]]
combinaciones 0 _ = [[]]
combinaciones _ [] = []
combinaciones k (x:xs) = [x:ys | ys <- combinaciones (k - 1) xs] ++ combinaciones k xs
combinationsN :: Int ->Int->[[Int]]
combinationsN n k = combinaciones k [1..n]
私の問題は、リスト内のリストの数 ([[Int]], Int) を持つリストのリストを返したいことです。どうやってやるの?