The two buttons affect the same counter.
Here is the source code:
import Fudgets main = fudlogue (shellF "Up/Down Counter" counterF) counterF = intDispF >==< mapstateF count 0 >==< (buttonF "Up" >+< buttonF "Down") count n (Left Click) = (n+1,[n+1]) count n (Right Click) = (n-1,[n-1])
using the operator
(buttonF "Up" >+< buttonF "Down")
>+<for parallel composition
Leftand output from the right component is tagged
countfunction will now receive
Right Click, depending on which button was pressed. It has been adjusted accordingly.