I am writing a haskell program with a graphical interface. When I write the following code snippet
onClicked btn $ do print 1 onClicked btn $ do print 2
Pressing btn led to printing 1 and 2 at the same time. How can I redefine a function definition so that the last definition replaces the first and prints only 2
Reference Information. I am writing a minesweeper game. When a button has a mine, it explodes, then I try to play again and determine the same button that will be cleared of mines, but clicking on it will again blow up the misha because of the first definition.
thanks
source share