generic type T is private; package Stack is type Stack is private; -- Push a value into the stack. procedure Push (S : in out Stack; Val : T); -- Pop a value from the stack. function Pop (S : in out Stack; Val : out T) return Boolean; -- Return true if the stack is empty, false otherwise. function Empty (S : Stack) return Boolean; private type Node; type Node_Access is access Node; type Node is record Val : T; Bottom : Node_Access; end record; type Stack is record Top : Node_Access; end record; end Stack;