diff --git a/exercises/Set3a.hs b/exercises/Set3a.hs index c63f194..408e094 100644 --- a/exercises/Set3a.hs +++ b/exercises/Set3a.hs @@ -218,6 +218,11 @@ allCombinations xs = merge (map (`allCombinationsWithStr` xs) xs) [] -- [1,2,3] +|+ [4,5,6] ==> [1,4] -- [] +|+ [True] ==> [True] -- [] +|+ [] ==> [] +(+|+) :: [a] -> [a] -> [a] +[] +|+ [] = [] +a +|+ [] = [head a] +[] +|+ b = [head b] +a +|+ b = [head a, head b] ------------------------------------------------------------------------------