[Haskell-beginners] Return a Foldable instance
Ozgur Akgun
ozgurakgun at gmail.com
Wed May 4 12:10:04 CEST 2011
On 4 May 2011 07:25, Federico Mastellone <fmaste at gmail.com> wrote:
> Because the underlying structure is already Foldable, so why creating
> a dummy function for every method on the Foldable class that only
> calls the same function but in the underlying structure.
If you make your MultiMap type and instance of Foldable, you get *every
method on the Foldable class* for free anyway. Namely, you do not need to
replicate functions with a Foldable constraint with your MultiMap data type.
HTH,
--
Ozgur Akgun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110504/1cfb9c50/attachment.htm>
More information about the Beginners
mailing list