summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/lisp-on-tex/examples
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/lisp-on-tex/examples')
-rw-r--r--Master/texmf-dist/doc/latex/lisp-on-tex/examples/div2.pdfbin0 -> 11875 bytes
-rw-r--r--Master/texmf-dist/doc/latex/lisp-on-tex/examples/div2.tex30
-rw-r--r--Master/texmf-dist/doc/latex/lisp-on-tex/examples/fact.pdfbin36636 -> 36632 bytes
-rw-r--r--Master/texmf-dist/doc/latex/lisp-on-tex/examples/fpnummodule-mandelbrot.pdfbin32299 -> 32295 bytes
-rw-r--r--Master/texmf-dist/doc/latex/lisp-on-tex/examples/nqueen.pdfbin12975 -> 12971 bytes
-rw-r--r--Master/texmf-dist/doc/latex/lisp-on-tex/examples/rocket.pdfbin30979 -> 30975 bytes
-rw-r--r--Master/texmf-dist/doc/latex/lisp-on-tex/examples/showfont.pdfbin13945 -> 13933 bytes
7 files changed, 30 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/lisp-on-tex/examples/div2.pdf b/Master/texmf-dist/doc/latex/lisp-on-tex/examples/div2.pdf
new file mode 100644
index 00000000000..6cb01f55aaa
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/lisp-on-tex/examples/div2.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/lisp-on-tex/examples/div2.tex b/Master/texmf-dist/doc/latex/lisp-on-tex/examples/div2.tex
new file mode 100644
index 00000000000..ae2cf824ee6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/lisp-on-tex/examples/div2.tex
@@ -0,0 +1,30 @@
+\documentclass{article}
+%\usepackage{lisp-on-tex}
+\usepackage[markGC]{lisp-on-tex}
+\lispinterp {
+ (\define (\create \n) (\createAcc \n ()))
+ (\define (\createAcc \n \acc)
+ (\lispif (\= \n :0) \acc (\createAcc (\- \n :1) (\cons () \acc))))
+ (\define \ll (\create :200))
+ (\define (\divII \l)
+ (\lispif (\= \l ()) () (\cons (\car \l) (\divII (\cdr (\cdr \l))))))
+ (\define (\test \l) (\testAcc \l :500)) % original is 300
+ (\define (\testAcc \l \i)
+ (\lispif (\= \i :0) ()
+ (\begin
+ (\lispif (\= (\length (\divII \l)) :100)
+ () (\texprint 'Hmm'))
+ (\lispif (\= (\length (\divII \l)) :100)
+ () (\message 'Hmm'))
+ (\lispif (\= (\length (\divII \l)) :100)
+ () (\message 'Hmm'))
+ (\lispif (\= (\length (\divII \l)) :100)
+ () (\message 'Hmm'))
+ (\texprint \i)
+ (\texprint ' ')
+ (\testAcc \l (\- \i :1)))))
+}
+
+\begin{document}
+ \lispinterp{(\test \ll)}
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/lisp-on-tex/examples/fact.pdf b/Master/texmf-dist/doc/latex/lisp-on-tex/examples/fact.pdf
index 490cce4e5e8..5bb156ab393 100644
--- a/Master/texmf-dist/doc/latex/lisp-on-tex/examples/fact.pdf
+++ b/Master/texmf-dist/doc/latex/lisp-on-tex/examples/fact.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/lisp-on-tex/examples/fpnummodule-mandelbrot.pdf b/Master/texmf-dist/doc/latex/lisp-on-tex/examples/fpnummodule-mandelbrot.pdf
index 19359ec0385..b40e5f7c9b7 100644
--- a/Master/texmf-dist/doc/latex/lisp-on-tex/examples/fpnummodule-mandelbrot.pdf
+++ b/Master/texmf-dist/doc/latex/lisp-on-tex/examples/fpnummodule-mandelbrot.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/lisp-on-tex/examples/nqueen.pdf b/Master/texmf-dist/doc/latex/lisp-on-tex/examples/nqueen.pdf
index 89425e38a5b..c605d4212c8 100644
--- a/Master/texmf-dist/doc/latex/lisp-on-tex/examples/nqueen.pdf
+++ b/Master/texmf-dist/doc/latex/lisp-on-tex/examples/nqueen.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/lisp-on-tex/examples/rocket.pdf b/Master/texmf-dist/doc/latex/lisp-on-tex/examples/rocket.pdf
index de0e6ca70f6..bfff99d340a 100644
--- a/Master/texmf-dist/doc/latex/lisp-on-tex/examples/rocket.pdf
+++ b/Master/texmf-dist/doc/latex/lisp-on-tex/examples/rocket.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/lisp-on-tex/examples/showfont.pdf b/Master/texmf-dist/doc/latex/lisp-on-tex/examples/showfont.pdf
index 0960b7a9fed..13ef7fce56a 100644
--- a/Master/texmf-dist/doc/latex/lisp-on-tex/examples/showfont.pdf
+++ b/Master/texmf-dist/doc/latex/lisp-on-tex/examples/showfont.pdf
Binary files differ