language-ext icon indicating copy to clipboard operation
language-ext copied to clipboard

Eq.ToEqualityComparer (Ord.ToComparer)

Open StefanBertels opened this issue 3 years ago • 2 comments

This is an addition to #720. I think it's less important than IComparer but still has some use when dealing with non-LanguageExt code (like LINQ extensions, System.Interactive ...).

I've seen that you changed #720 to avoid a record problem and I added a small assertion in that ord test to make that more explicit (avoiding that it get's changed back easily).

I renamed Ord.ToComparable to Ord.ToComparer because I think the latter is more correct to align this to *Comparable vs. *Comparer and *Equatable vs. *EqualityComparer.

StefanBertels avatar Dec 11 '20 15:12 StefanBertels

I personally don't need https://github.com/louthy/language-ext/pull/841/commits/3c131cc821e648c607325e8ef4880a17325f75dd but added this just in case we want avoid any breaking change.

StefanBertels avatar Apr 28 '22 16:04 StefanBertels

rebased on current main

StefanBertels avatar Jun 30 '22 09:06 StefanBertels

Thanks @StefanBertels 👍

louthy avatar Nov 16 '22 13:11 louthy