typelevel / algebra

Experimental project to lay out basic algebra type classes
https://typelevel.org/algebra/
Other
378 stars 69 forks source link

Add Eq and PartialOrder instances for List. #122

Closed non closed 8 years ago

non commented 8 years ago

Fixes #118.

Note that if we want to support "pairwise instances" for additive/multiplicative semigroups for lists they would be really easy to do (treating uneven lengths as one/zero padded).

ceedubs commented 8 years ago

Can we add law-checking for these?

non commented 8 years ago

Yes, I'll enable the additional law-checking too. Thanks for keeping me honest @ceedubs!

johnynek commented 8 years ago

+1 for tests.

Could we factor the inner loop of these functions to only consume iterators without a perf cost? Then we could easily make instances for other Iterable types?

non commented 8 years ago

@johnynek Yeah Iterator and Builder might work for everything except Array. I'll give it a shot.