[Haskell-cafe] UI-state, using State Monad or IORef?
redcom at fedoms.com
Fri Jan 30 16:50:27 EST 2009
at one point I generate n elements of dropdowns dynamically. Whenever
I make a selection in any of those choices the others should also be
updated, ie. the list of available choices needs to be altered.
But I also need to update in place the "model" that is associated with
each individual dropdown.
Should I simply use IORefs for this purpose, or should I rather use a
more functional code with the State Monad?
Is there a tutorial or an example on how to use the State monad?
More information about the Haskell-Cafe