
1 Oct
2021
1 Oct
'21
5:05 a.m.
On Thu, Sep 30, 2021 at 09:14:36PM -0400, Viktor Dukhovni wrote:
In fact all class methods have simple semantic definitions in terms of the same named functions from Data.List via 'toList'.
But performance may differ radically, and `toList` may diverge for `snocList` when infinite on the left, though that's a rather pathological example.
If one can't write Foldable-generic functionality in a way that provides some reasonable uniformity of performance over different instances then one wonders what is point of having Foldable as a typeclass at all. At that point it's just name overloading. Tom