elemIndex searches for the first argument in the second argument, which is a list. It returns the Maybe Int - Just index if the element is found, Nothing otherwise.
isJust returns true if Maybe is equal to Just , false if it is Nothing .
In other words, this is a very inconvenient way to check if board contains 0. The best way is
hasUnassigned board = 0 `elem` board
source share