Thu, 19 Aug 1999 19:08:49 +1000, Fergus Henderson <[EMAIL PROTECTED]> pisze:
> > The problem with this is that the caller of `biggest' needs to call
> > `mkShape' on each element in the list before it can construct the list.
> > Not _bad_, but rather unwieldy. The caller can't simply use `map' either
> > if each element is of a different type.
> >
> > Anyone know of an elegant way to do this?
>
> I think that's the best you can do in standard Haskell.
One could define a specific polymorphic operator instead of : or [,,,]
to create such lists, so it would remove explicit `mkShape' calls.
--
__("< Marcin Kowalczyk * [EMAIL PROTECTED] http://kki.net.pl/qrczak/
\__/ GCS/M d- s+:-- a22 C+++>+++$ UL++>++++$ P+++ L++>++++$ E-
^^ W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP->+ t
QRCZAK 5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y-