-- Polymorphic stack example (package specification)
-- in Ada from page 248 of
-- Kenneth C. Louden, Programming Languages
-- Principles and Practice 2nd Edition
-- Copyright (C) Brooks-Cole/ITP, 2003

generic
  type T is private;
package Stacks is
  type StackNode;
  type Stack is access StackNode;
  type StackNode is
  record
    data: T;
    next: Stack;
  end record;
  function top( s: Stack ) return T ;
end Stacks;
