--  A matrix's components collected into an array (carried from T32a): in row-major order,
--  the collection's room the product of the lengths and its count the loop's own, proved
with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
   subtype Small is Integer range -100 .. 100;
   type Vector is array (Positive range <>) of Integer;
   type Matrix is array (Positive range <>, Positive range <>) of Small;
   function Flat (M : Matrix) return Vector is ([for E of M => E])
     with Pre => M'Length (1) <= 100 and M'Length (2) <= 100;
   function Positives (M : Matrix) return Vector is ([for E of M when E > 0 => E])
     with Pre => M'Length (1) <= 100 and M'Length (2) <= 100;
   A : constant Matrix := ((1, -2, 3), (-4, 5, 6));
begin
   for E of Flat (A) loop Put (Integer'Image (E)); end loop;
   New_Line;
   for E of Positives (A) loop Put (Integer'Image (E)); end loop;
   New_Line;
end Main;
