You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This could throw for keys that don't have a stable comparison order, e.g. most objects
stable_compare could check for instances of this class
This could be used in StableMinHeap, stable sorts, etc.
This class would override the regular object comparison handler to compare $key if the instances were the same to be usable in <=>, <, sort, etc.
The text was updated successfully, but these errors were encountered:
TysonAndre
changed the title
Idea: final class Teds\ComparableObject {public $key: mixed; public $value; }
Idea: final class Teds\ComparableObject {public readonly $key: mixed; public $value; }Nov 10, 2022
<=>
,<
, sort, etc.The text was updated successfully, but these errors were encountered: