Fixes solve by fixing arg name

This commit is contained in:
Abhinav Sarkar 2018-06-27 15:27:34 +05:30
parent 33c706e71e
commit 0ef77341a1

View File

@ -113,11 +113,11 @@ nextGrids grid =
solve :: Grid -> Maybe Grid solve :: Grid -> Maybe Grid
solve grid = pruneGrid grid >>= solve' solve grid = pruneGrid grid >>= solve'
where where
solve' grid' solve' g
| isGridInvalid grid = Nothing | isGridInvalid g = Nothing
| isGridFilled grid' = Just grid' | isGridFilled g = Just g
| otherwise = | otherwise =
let (grid1, grid2) = nextGrids grid' let (grid1, grid2) = nextGrids g
in solve grid1 <|> solve grid2 in solve grid1 <|> solve grid2
main :: IO () main :: IO ()