[Haskell-beginners] Foldable for (,)

David Thomas davidleothomas at gmail.com
Mon Apr 24 08:20:10 UTC 2017

One thing that's been missed in this discussion is that constraints
can propagate.

Of course no one is wanting to pass something they know is a tuple
into a function they know is length.  But a function that expects
something Foldable might want to know length or sum, and it might be
reasonable to call that function on a tuple.

On Sun, Apr 23, 2017 at 11:52 PM, Jonathon Delgado
<voldermort at hotmail.com> wrote:
> Tony Morris - please could you give a (practical) example of code where the a tuple could realistically be passed to length, but you don't know what the answer will be at compile time?
> Michael Orlitzky - everything in .NET has to descend from Object because of it's OO design. Why does tuple have to implement Foldable if it doesn't provide any useful functions?
> Thank you very much everyone in this thread for helping me understand!
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners

More information about the Beginners mailing list