type
TList = specialize TFPGList<TData>;
TMap = specialize TFPGMap<TKey, TData>;
var
a: TList;
m: TMap;
idx: integer;
begin
....
m := TMap.Create;
for idx := 0 to a.count-1 do
begin
m.add(a.items[idx].e, a.items[idx]);
end;
....
m.Free;
....
type
TList = specialize TFPGList<TData>;
TMap = specialize TFPGMap<TKey, TData>;
var
a: TList;
m: TMap;
idx: integer;
begin
....
m := TMap.Create;
for idx := 0 to a.count-1 do
begin
m.add(a.items[idx].e, a.items[idx]);
end;
....
m.Free;
....