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 = pruneGrid grid >>= solve'
where
solve' grid'
| isGridInvalid grid = Nothing
| isGridFilled grid' = Just grid'
| otherwise =
let (grid1, grid2) = nextGrids grid'
solve' g
| isGridInvalid g = Nothing
| isGridFilled g = Just g
| otherwise =
let (grid1, grid2) = nextGrids g
in solve grid1 <|> solve grid2
main :: IO ()