with Ada.Text_IO;
with Gen;
with Twice;
procedure Main is
   function Image (X : Integer) return String is (Integer'Image (X));
   package G is new Gen (Size => 3, Item => Integer, Image => Image);
   function T is new Twice (Factor => 3);
   Offset : constant Integer := 10;
   --  an expanded name whose prefix is an enclosing subprogram (RM 4.1.3(5))
   function Shifted (Y : Integer) return Integer is (Shifted.Y + Main.Offset)
     with Pre => Y in 0 .. 100;
begin
   G.Show ([4, 5, 6]);
   Ada.Text_IO.Put_Line (Integer'Image (G.Capacity) & Integer'Image (T (5)) & Integer'Image (Shifted (1)));
end Main;
