package Stacks is
   type Stack (Capacity : Positive) is private;
   function Size (S : Stack) return Natural;
   function Make (C : Positive) return Stack with Post => Make'Result.Capacity = C;
private
   type Stack (Capacity : Positive) is record
      Top : Natural := 0;
   end record;
   function Size (S : Stack) return Natural is (S.Top);
   function Make (C : Positive) return Stack is ((Capacity => C, Top => 0));
end Stacks;
