let top t =
  match t.data with
    [] -> raise Empty
  | x :: _ -> x