\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input HEAP.input}
\author{The Axiom Team}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
<<*>>=

-- Input generated from HeapXmpPage
)clear all

h := heap [-4,9,11,2,7,-7]
insert!(3,h)
extract! h
h
[extract!(h) while not empty?(h)]
heapsort(x) == (empty? x => []; cons(extract!(x),heapsort x))
h1 := heap [17,-4,9,-11,2,7,-7]
heapsort h1
@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}