edit AssocList by key
问题 I'm trying to build a recursive function that replaces the CellType by the Cell. Just like this: > editBoard [((2,2),Mine),((2,3),Mine),((3,2),Mine)]((2, 4), Flag) > [((2,2),Mine),((2,3),Flag),((3,2),Mine)] This is what I have so far: editBoard :: Board -> (Cell, CellType) -> Board editBoard (Board ((x, y):xs)) (a, b) | x == a = (Board ((x, b) : xs)) | otherwise = ((x, y) : editBoard (Board xs) (a, b)) I keep getting an error that says Couldn't match expected type ‘[(Cell, CellType)]’ with