
23 Feb
2016
23 Feb
'16
4:12 a.m.
On Sun, 21 Feb 2016, Jeremy wrote:
Let us consider some of the functions that Foldable actually provides for tuples:
length Useless and wrong. Unless "length" means "the number of items which fmap will operate over", in which case it's just useless and misleading.
maximum Useless and wrong/misleading.
minimum Useless and wrong/misleading.
product Useless and wrong/misleading.
sum Useless and wrong/misleading.
An alternative to custom types is to stay with pairs but use lenses instead of type class methods: http://www.haskellforall.com/2015/10/explicit-is-better-than-implicit.html