
14 Aug
2013
14 Aug
'13
1:21 p.m.
I recently ran into this with a GUI application, where I needed to process a list of widgets that were members of the same typeclass, but I had to wrap them all because they were different types.
Your misconception is likely that you need to /store/ widgets, because you think in terms of memory. What you really need is /definitions/ of widgets, which can very well have different types. Then you can combine them using the usual monadic or applicative interface.
Ertugrul, can you please expand on this? Giacomo