[Haskell-cafe] Foldable for (,)

Jonathon Delgado voldermort at hotmail.com
Wed May 3 07:21:21 UTC 2017

I sent the following post to the Beginners list a couple of weeks ago (which failed to furnish an actual concrete example that answered the question). Upon request I'm reposting it to Café:

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?

More information about the Haskell-Cafe mailing list