Fix Day 19, Puzzle 1 solution
This commit is contained in:
parent
176b562eb4
commit
5390addcff
@ -13,7 +13,7 @@ getDesignCombinations design towels cur = do
|
|||||||
|
|
||||||
let design' = drop (length towel) design
|
let design' = drop (length towel) design
|
||||||
if null design'
|
if null design'
|
||||||
then return $ drop 1 cur
|
then return $ drop 1 cur ++ "," ++ towel
|
||||||
else getDesignCombinations design' towels (cur ++ "," ++ towel)
|
else getDesignCombinations design' towels (cur ++ "," ++ towel)
|
||||||
|
|
||||||
isDesignPossible :: String -> [String] -> Bool
|
isDesignPossible :: String -> [String] -> Bool
|
||||||
|
Loading…
x
Reference in New Issue
Block a user