-- File listg.ads -- This package implements a generic list, using access types -- The list is intended to be used as part of lab5, being used -- to implement a queue generic type Element is private; package Listg is type List is private; -- constructors procedure Copy (Source: in List; Destination: in out List); procedure Clear (AList: in out List); procedure Cons (Item: in Element; AndList: in out List); -- insert a new node containing Item at the front of the list procedure Append (AList: in List; ToList: in out List); -- make AList the tail of ToList -- selectors function Equal (Left: in List; Right: in List) return Boolean; function Empty (AList: in List) return Boolean; function First (OfList: in List) return Element; -- return element stored in first node of list function Rest (OfList: in List) return List; -- return list following first node -- exceptions Underflow, Overflow: exception; -- hidden part private type Node; type List is access Node; type Node is record Datum: Element; Tail: List; end record; end Listg;