function EachCountMy(Self: T): integer; extensionmethod; begin Result := 3 end; function EachCountMy(Self: sequence of System.Linq.IGrouping): integer; extensionmethod; begin Result := 2 end; function EachCountMy(Self: sequence of T): integer; extensionmethod; begin Result := 1 end; function EachCountMy(Self: sequence of List): integer; extensionmethod; begin Result := 4 end; function EachCountMy(Self: Dictionary): integer; extensionmethod; begin Result := 7 end; function EachCountMy(Self: Dictionary>): integer; extensionmethod; begin Result := 8 end; begin var s := 'aa bbb aa c f f ddd e e f '; Assert(Lst(Lst(1),Lst(2)).EachCountMy = 4); // 4 Assert(s.ToWords.GroupBy(x->x).EachCountMy = 2); // 2 Assert(s.ToWords.EachCountMy = 1); // 1 Assert(Dict(KV(1,2)).EachCountMy = 7); // 7 Assert(Dict(KV(1,Lst(1,2))).EachCountMy = 8); // 8 Assert(1.EachCountMy = 3); // 3 Assert(byte(1).EachCountMy = 3); // 3 end.