I am using the following function:
combinations :: Int -> [a] -> [[a]] combinations k xs = combinations\' (length xs) k xs where combinations\' n k\' l@(
Because of l@(x:xs) in combinations' n k' l@(y:ys) you're missing the case combinations _ _ [].
l@(x:xs)
combinations' n k' l@(y:ys)
combinations _ _ []
The guard null l will always be False.
null l
False