
Thank you for your explanation, but I think I'm missing something basic. Lists can have a variable length, so it makes sense to have operations that return the length or operate over a set. As ((,) a) can only have one value, the Foldable operations appear to be redundant as well as misleading (by implying that there could be more than one value).
From: Haskell-Cafe
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? _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Haskell-Cafe Info Page mail.haskell.org This mailing list is for the discussion of topics related to Haskell. The volume may at times be high, as the scope is broader than the main Haskell mailing list.
Only members subscribed via the mailman list are allowed to post.