Inverted index: Difference between revisions

m (→‎{{header|Wren}}: Minor tidy)
 
Line 430:
===Alternative Implementation of Generic_Inverted_Index (Ada 2012)===
 
The new standard Ada 2012 simplifies the usage of containers significantly. The following runs under gnat (GNAT GPL 2011 (20110419)), when using the experimental -gnat2012 switch. The main program is the same. Here is the spec for Generic_Inverted_Index:
 
<syntaxhighlight lang="ada">with Ada.Containers.Indefinite_Vectors;
Line 561:
procedure Iterate(The_Sources: Vector) is
begin
for Some_Element inof The_Sources loop
Do_Something(Element(Some_Element));
end loop;
end Iterate;
18

edits