public struct KeyValuePair[X,Y] { public this (_x : X, _y : Y) { } } public interface IComparer[T] { Compare (mutable x : T) : int; } public class KeyValuePairComparer[K,V] : IComparer[KeyValuePair[K,V]] { public Compare (_a : KeyValuePair[K,V]) : int { 0; } } public class TreeBag[T] { mutable comparer : IComparer[T]; mutable item : T; public this (mutable comparer : IComparer[T],mutable item : T) { this.comparer = comparer; this.item = item; } public Find () : int { comparer.Compare (item); } } public class X { public static Main () : void { mutable pair = KeyValuePair (3, 89); mutable comparer = KeyValuePairComparer (); mutable bag = TreeBag (comparer, pair); _ = bag.Find (); } } /* BEGIN-OUTPUT END-OUTPUT */