\documentclass{article} \usepackage{axiom} \begin{document} \title{\$SPAD/src/input bags.input} \author{The Axiom Team} \maketitle \begin{abstract} \end{abstract} \eject \tableofcontents \eject \section{License} <>= --Copyright The Numerical Algorithms Group Limited 1994. @ <<*>>= <> a:Stack INT:= stack [1,2,3,4,5] pop! a a push!(9,a) a empty? a b:=empty()$(Stack INT) empty? b c:ArrayStack INT:= arrayStack [1,2,3,4,5] pop! c c push!(9,c) c empty? c d:=empty()$(ArrayStack INT) empty? d e:Queue INT:= queue [1,2,3,4,5] dequeue! e e enqueue!(9,e) e empty? e f:=empty()$(Queue INT) empty? f g:Dequeue INT:= dequeue [1,2,3,4,5] extractBottom! g g insertBottom!(9,g) g extractTop! g g insertTop!(9,g) g empty? g h:=empty()$(Dequeue INT) empty? h i:Heap INT := bag [1,6,3,7,5,2,4] insert!(10,i) i max i extract! i i heapsort x == empty? x => [] cons(extract! x,heapsort x) heapsort i @ \eject \begin{thebibliography}{99} \bibitem{1} nothing \end{thebibliography} \end{document}