[Haskell-beginners] Heterogeneous Lists

Ozgur Akgun ozgurakgun at gmail.com
Tue May 28 19:28:06 CEST 2013


On 28 May 2013 18:07, Frerich Raabe <raabe at froglogic.com> wrote:

> On May 28, 2013, at 12:36 AM, harry <voldermort at hotmail.com> wrote:
> > Every OO language which supports generics allows a declaration such as
> > List<Show> alist, where Show is an interface. Any type implementing Show
> can
> > be put in alist, and any Show operation can be performed on the alist's
> > members. No casts, wrappers, or other special types and plumbing are
> needed.
> >
> > Why isn't it possible to do this directly in Haskell?
> My impression is that you often don't have this requirement, since
> functions are first-class values and you can treat them as closures.

This might also be relevant:

Hope this helps,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130528/75a8ef2e/attachment.htm>

More information about the Beginners mailing list