[Haskell-cafe] Textbook example of instance Foldable ((,)a)
Barak A. Pearlmutter
barak at pearlmutter.net
Wed Nov 25 19:56:49 UTC 2020
True. And their use in Arrow is a great example of pairs that do *not*
work well as instances of Foldable as currently defined. Arrow is
using pairs as abstract Cartesian products, and the natural
isomorphism A×B≅B×A is used implicitly all the time. The Foldable
definition for pairs breaks that symmetry inappropriately.
Cheers,
--Barak.
More information about the Haskell-Cafe
mailing list