diff options
author | dos-reis <gdr@axiomatics.org> | 2007-08-14 05:14:52 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2007-08-14 05:14:52 +0000 |
commit | ab8cc85adde879fb963c94d15675783f2cf4b183 (patch) | |
tree | c202482327f474583b750b2c45dedfc4e4312b1d /src/input/mappkg1.input.pamphlet | |
download | open-axiom-ab8cc85adde879fb963c94d15675783f2cf4b183.tar.gz |
Initial population.
Diffstat (limited to 'src/input/mappkg1.input.pamphlet')
-rw-r--r-- | src/input/mappkg1.input.pamphlet | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/input/mappkg1.input.pamphlet b/src/input/mappkg1.input.pamphlet new file mode 100644 index 00000000..21d98364 --- /dev/null +++ b/src/input/mappkg1.input.pamphlet @@ -0,0 +1,54 @@ +\documentclass{article} +\usepackage{axiom} +\begin{document} +\title{\$SPAD/src/input MAPPKG1.input} +\author{The Axiom Team} +\maketitle +\begin{abstract} +\end{abstract} +\eject +\tableofcontents +\eject +<<*>>= + +-- Input generated from MappingPackageOneXmpPage +)clear all + +power(q: FRAC INT, n: INT): FRAC INT == q**n +power(2,3) +rewop := twist power +rewop(3, 2) +square: FRAC INT -> FRAC INT +square:= curryRight(power, 2) +square 4 +squirrel:= constantRight(square)$MAPPKG3(FRAC INT,FRAC INT,FRAC INT) +squirrel(1/2, 1/3) +sixteen := curry(square, 4/1) +sixteen() +square2:=square*square +square2 3 +sc(x: FRAC INT): FRAC INT == x + 1 +incfns := [sc**i for i in 0..10] +[f 4 for f in incfns] +times(n:NNI, i:INT):INT == n*i +r := recur(times) +fact := curryRight(r, 1) +fact 4 +mto2ton(m, n) == + raiser := square**n + raiser m +mto2ton(3, 3) +shiftfib(r: List INT) : INT == + t := r.1 + r.1 := r.2 + r.2 := r.2 + t + t +fibinit: List INT := [0, 1] +fibs := curry(shiftfib, fibinit) +[fibs() for i in 0..30] +@ +\eject +\begin{thebibliography}{99} +\bibitem{1} nothing +\end{thebibliography} +\end{document} |