[Haskell-beginners] Foldable for (,)

Kim-Ee Yeoh ky3 at atamo.com
Wed May 3 04:00:07 UTC 2017


Hey Jonathon,

Based on the last email you sent, it seems like you're not quite satisfied
with the responses.

And for good reason.

It turns out that there is more to

length (2,3) = 1
sum (2,3) = product (2,3) = 3

than just the offending Traversable instance of the tuple pair (,).

Would you mind resending your first email of Apr 23 to the haskell-cafe
mailing list?

If you do so, I'll contribute by opening a discussion of the Functor
instance.


Best,
Kim-Ee


On Sunday, April 23, 2017, Jonathon Delgado <voldermort at hotmail.com> wrote:

> I've seen many threads, including the one going on now, about why we need
> to have:
>
> length (2,3) = 1
> product (2,3) = 3
> sum (2,3) = 3
> or (True,False) = False
>
> but the justifications all go over my head. Is there a beginner-friendly
> explanation for why such seemingly unintuitive operations should be allowed
> by default?
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org <javascript:;>
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>


-- 
-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20170503/de6a3945/attachment.html>


More information about the Beginners mailing list