summaryrefslogtreecommitdiff
path: root/H26.hs
blob: 4497e8c264c335664f6ab28d46bd46b17e188220 (plain)
1
2
3
4
5
combination :: Int -> [a] -> [[a]]
combination 0 _ = [[]]
combination _ [] = []
combination c (x:xs) = (map (x:) (combination (c-1) xs)) ++ (combination c xs)