I have written something like this
gameOver :: Board -> Bool gameOver testboard = any checksingle ( nub (rows testboard)) where checksingle :: [Cell