purescript-foldable-traversable icon indicating copy to clipboard operation
purescript-foldable-traversable copied to clipboard

Make length, etc. members?

Open matthewleon opened this issue 7 years ago • 1 comments

In Haskell's Data.Foldable, a lot of the utility functions are class members, allowing for instances to define more efficient implementations. What do people think of potentially doing this here?

matthewleon avatar Feb 01 '18 21:02 matthewleon

Until we have default member implementations we don't want to do this, as implementing 20+ functions rather than 2 or 3 is a little unreasonable for instance-writers to be expected to deal with.

garyb avatar Feb 01 '18 22:02 garyb